IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New OK, now I want logging suggestions
The following is the help message from my program.

#1 - Is it understandable to you?
#2 - Are there any other standard fields I should be logging, ie: What did I miss?

\n/lf/bin/sql_log.pl: Insert / Update an entry in the log table\n\nProgram will display to STDOUT the id of the record generated.\n\nMust have at LEAST one field assigned via:\n        --val field=data\n\nSuch as:\n        --val control_file="test2"\n\nAdd multiple --val flags for each field.\nPossible fields are:\n        control_file\n        run_user\n        sge_id\n        sge_job\n        sge_stdout_file\n        sge_stderr_file\n        parent_sge_id\n        parent_sge_job\n        project\n        job\n        subsystem\n        program\n        log_text\n        result_message\n        exit_value\n        program_start_time\n        program_end_time\n\n\nOptional:\n        --dbname=s        Currently: mash01\n        --user=s          Currently: Log\n        --passwd=s\n        --log_table=s     Currently: prod_log\n        --id_field=s      Currently: id\n        --update\n        --last_id=s\n        --key_override\n\nIf using --update, you must supply the id generated by the insert statement, ie:\n        --last_id=1234\n\nIf you want to use fields this program is unaware of, use:\n        --key_override\nThis flag will accept all keys as valid columns. It will NOT attempt to validate\nthem and the program will error out if they do not exist in the target log table.\n\n\nExample usage\n-------------\nInsert step:\n\nsql_log.pl \\\n  --val control_file=p9250t12.ctl.20040914_162603 \\\n  --val run_user=broom@cc3.com \\\n  --val sge_job=Qp9250t12-12-gen_afp \\\n  --val sge_id=11202 \\\n  --val sge_stdout_file=Qp9250t12-12-gen_afp.o11202 \\\n  --val sge_stderr_file=Qp9250t12-12-gen_afp.e11202 \\\n  --val parent_sge_job=p9250t12 \\\n  --val parent_sge_id=11178 \\\n  --val project=p9250 \\\n  --val job=p9250t12 \\\n  --val subsystem=PNT_SPOOL \\\n  --val program=gen_afp.pl \\\n  --val program_start_time="`date`"\n\n\nThis produces:\n\nAssigned ID: 7\n\nYou must take that ID and then:\n\nUpdate step:\n\nsql_log.pl \\\n        --update \\\n        --last_id=7 \\\n        --val log_text="This program ran OK - random text" \\\n        --val result_message="24 pages produced" \\\n        --val exit_value=0 \\\n        --val program_end_time="`date`"\n\n\nYou may feed the full text "Assigned ID: 7" as the arg for the\n--last_id and the program will parse it out, allowing seamless\ntemp var/file usage for passing the id around.\n\n\nThe above example will produce this log record:\n-[ RECORD 7 ]-----+----------------------------------\nid                 | 7\nctime              | 2004-09-19 10:12:00.633873\ncontrol_file       | p9250t12.ctl.20040914_162603\nrun_user           | broom@cc3.com\nsge_job            | Qp9250t12-12-gen_afp\nsge_id             | 11202\nsge_stdout_file    | Qp9250t12-12-gen_afp.o11202\nsge_stderr_file    | Qp9250t12-12-gen_afp.e11202\nparent_sge_job     | p9250t12\nparent_sge_id      | 11178\nproject            | p9250\njob                | p9250t12\nsubsystem          | PNT_SPOOL\nprogram            | gen_afp.pl\nlog_text           | This program ran OK - random text\nresult_message     | 24 pages produced\nexit_value         | 0\nprogram_start_time | 2004-09-19 10:12:00\nprogram_end_time   | 2004-09-19 10:12:05\n\n\n\n
New A thought on Q#1 only, because...
...answering Q2 would require me to think about the actual job you're trying to do, and I'm not sure I remember the details too well, and I'm not about to look them up in a bunch of old threads -- Anyway, about #1, "Is [the help message] understandable to you?", one comment:

I assume the single 's' in "--dbname=s", "--user=s", etc, stands for "string". If you're mostly going to be running this yourself, that's fine; but, if you have a bunch of less-sophisticated (l)users who'll be running this, then it might be good to spell that out.

Just a thought.


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New (l)users don't run command line loggers
This is strictly for programmers automating production flows.
     Postgres / serial datatype / perl question - (broomberg) - (9)
         Getting closer - (broomberg)
         Did you google? - (ben_tilly) - (4)
             Yup. Didn't find that though. - (broomberg) - (2)
                 my, that's a big hammer you have there... - (cforde) - (1)
                     Oh, I'll modify it - (broomberg)
             SELECT currval - (altmann)
         OK, now I want logging suggestions - (broomberg) - (2)
             A thought on Q#1 only, because... - (CRConrad) - (1)
                 (l)users don't run command line loggers - (broomberg)

do
head.bang(wall);
while(1);
51 ms