#---------------------------------------------------------------------- # Meta-Update is copyright (c) 1996-2010 by Software Tool House Inc. # www.softwaretoolhouse.com # This is a Meta-Update sample script #----------------- # File: SwLogs.ini # # This Meta-Update script sets the server logs by writing to the # record 000000000000001 of a "Vendor" form introduced in ARS 7.0: # AR System Administration: Server Information # # It switches logs to the specified log file name. # # Log path and extension should NOT be supplied as an argument and # are coded in the [asg-Cfg] section below. # # [asg-Cfg] sets the path to the ARS_INFO SERVER_DIR value by default. # Please edit [asg-Cfg] to change the default path and file extensions. # #----------------------------------------------------------------------.chg # Change History: # 2010-Apr-15 Ben Chernys # - Created #---------------------------------------------------------------------- #----------------------------------------------------------------------.cfg++ [asg-Cfg] # This ia an Assignment section called only when the script begins # Set these vars to alter the behaviour of the script # Output tags: # Cfg, LogPth The path prefix for the log # Cfg, LogSfx The ',log' suffix # # SERVER_DIR terminates in a (back)slash in 7.+ @Cmd = Ref, Cfg, LogPth, $AR_INFO, SERVER_DIR$" # @Cmd = Ref, Cfg, LogSfx, ".log" #----------------------------------------------------------------------.cfg-- #----------------------------------------------------------------------.main++ [Main] # This [Main] section gives script arguments and server info # Here, we'll use environment variable # And we only need the file name to import as an argument # Server = $ ENV, ArsSvr $ Port = $ ENV, ArsPort $ User = $ ENV, ArsUsr $ Password = $ ENV, ArsPwd $ ArgNm = log PrmReq = 1, . Function: PrmReq = . This is a Meta-Update script that switches the ARserver log files PrmReq = . PrmReq = . Usage PrmReq = . SthMupd $CTL, ScriptFx$ Do -p log PrmReq = . where log is a log file name without a path PrmReq = . and without the .log PrmReq = . The path and ".log" are configurable PrmReq = . in the script PrmReq = . Examples PrmReq = . SthMupd $CTL, ScriptFx$ Do -p my PrmReq = . will set all log files to: PrmReq = . "$AR_INFO, SERVER_DIR$my.log" PrmReq = . #----------------------------------------------------------------------.main-- #----------------------------------------------------------------------.do++ [Do] # This is the "main entry point" of the script # Id down no Queries and so does a single record update to # a hard coded request id # AssignInit = asg-Cfg Update = PIOtst, & AR System Administration: Server Information, & '1' = "000000000000001" Assign = Do-asg [Do-asg] # This is the assignments made to the single record vendor form for ar.conf # First, we set the full path info for the passed log file # @Cmd = Ref, X, @na, @regex, #(.*)[\\\\/](.*)#, $Arg, log$ @Cmd = @if("$X, @rc$") @Cmd = Ref, V, LogNm, $Arg, log$ @Cmd = else @Cmd = Ref, V, LogNm, "$Cfg, LogPth$$Arg, log$$Cfg, LogSfx$" @Cmd = endif apilogfile = V, LogNm dsologfile = V, LogNm escalationlogfile = V, LogNm filterlogfile = V, LogNm sqllogfile = V, LogNm threadlogfile = V, LogNm userlogfile = V, LogNm alertlogfile = V, LogNm pluginlogfile = V, LogNm arforklogfile = V, LogNm servergrouplogfile = V, LogNm #----------------------------------------------------------------------.do--