User Tools

Site Tools


admin:runningexamples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
admin:runningexamples [2013/09/21 13:55] jwarrioradmin:runningexamples [Unknown date] (current) – external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
 +====== Running Examples ======
  
 +  * test packaged images.
 +  * load the config map.
 +  * load the 8/2/2011 verions of LogManager>>readIniFile. Only the last three lines are different.
 +  * put the packaged images in c:\temp
 +  * from nls, run //..\bin\nodialog -ic:\temp\hw -lCON -ini:c:\temp\abt.ini//
 +  * or, //..\bin\nodialog -ic:\avast\229\image852\epappl -lCON -ini:c:\avast\229\image852\abt.ini//
 +  * or //..\bin\nodialog -ic:\avast\264\newimage860\helloworld -lCON -ini:c:\avast\264\newimage860\abt.ini//
 +  * the switch above is -i, not -ic:
 +  * XD images get run just like abt.icx.
 +
 +<code>
 +EslogManage>>readIniFile
 +
 + | iniContent noError runParams |
 +
 + iniContent := Dictionary new.
 + (System iniFileGetContentsArray: 'log4s')
 + associationsDo: [:assoc | iniContent add: (Association key: assoc key value: assoc value)].
 +
 + iniContent isEmpty ifTrue: [^self]. "this is ok"
 +
 + noError := true.
 + #('debugEnabled' 'quietMode' 'globalLevel') do: [:each |
 + iniContent
 + at: each
 + ifAbsent: [
 + EsLogLog error: (MxESf17 bindWith: each). "$NLS$ Missing required ini file setting for %1"
 + noError := false]].
 +
 + iniContent
 + at: 'debugEnabled'
 + ifPresent: [:value | (self checkDebugEnabled: value) isNil ifTrue: [noError := false]];
 + at: 'quietMode'
 + ifPresent: [:value | (self checkQuietMode: value) isNil ifTrue: [noError := false]];
 + at: 'globalLevel'
 + ifPresent: [:value | (self checkGlobalLevel: value) isNil ifTrue: [noError := false]].
 +
 + noError ifFalse: [^self].
 +
 + self checkForNewLogger: iniContent.
 +
 + self checkForAsyncAppender: iniContent.
 +
 + self checkForTranscriptAppender: iniContent.
 +
 + self checkForConsoleAppender: iniContent.
 +
 + self checkForFileAppender: iniContent.
 +
 + self checkForRollingFileAppender: iniContent.
 +
 + self checkForDailyRollingFileAppender: iniContent.
 +
 + self checkForSocketAppender: iniContent.
 +
 + self checkForFilters: iniContent. "check for filters after all the appenders have been created"
 +
 + EsLogLog error: 'finished processing readIniFile'. "dq remove next 3 lines"
 +
 + runParams := self checkForRunForeverParams: iniContent.
 +
 + runParams class = Association
 + ifTrue: [self class logEventsFor: runParams key delay: runParams value anIniFile: iniContent]
 +</code>