#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