The EsLoggingEvent object instance variable is probably most useful when set to the object that created the logging event, but you can put any object in it that you want and customize its logging in a printLog4s method on that object's class. See the conversion specifier discussion.
• classNameFilter anArray: add a filter that allows through log events from a certain class. The filter specific portion of the array takes the form
• addLevelRangeFilter: anArray add a filter that allows through log events within a certain range of levels. The filter specific portion of the array takes the form
• addStringMatchFilter: anArray add a filter that allows through log events containing a certain string. The filter specific portion of the array takes the form
• addAppender: aNameString creates an EsAppender, or one of its subclasses. Unlike log4j, however, # addAppender in log4s will not create an EsAppender if the EsLogger already has an EsAppender by that name. A successful call will return the added EsAppender, and one that fails will return nil.
• removeAppender: aNameString will remove an EsAppender if an EsAppender by that name exists on the EsLogger after first calling shutDown on the EsAppender to close any open files. A successful call will return the removed EsAppender, and one that fails will return nil.
• removeAllAppenders sends the shutDown message to all EsAppenders associated with the EsLogger, and then resets the collection of EsAppenders to empty. The EsLogger will still exist.
• getAppender: aNameString returns the existing EsAppender by that name or nil if none exists.
• allAppenders returns all the EsAppenders that belong to the EsLogger.
• removeFilter: aNameString will remove a filter if a filter by that name exists on the EsAppender.The preferred method of adding a filter to an EsAppender is through the EsLogManager using the filter instance creation methods.See AddingFilters.
![]() |