Namespace: OpenEdge.Logging
Class
LoggerBuilder
Parent classes:
Inherits: OpenEdge.Core.Util.ConfigBuilder

Copyright (c) 2016-2019 by Progress Software Corporation. All rights reserved.
File:LoggerBuilder
Purpose:A factory for creating loggers
Author(s):pjudge
Created:Wed Nov 16 21:43:11 EST 2016
/* Private variable with the enum (int64) vaues in the OpenEdge.Logging.LogLevelEnum type. Used
when we get the default log-manager-based logger




Method Summary
Options Name Purpose
OpenEdge.Logging.LoggerBuilder AddFilter (character) /* Adds a filter to the logger being built @param character The filter name to add @return LoggerBuilder This builder object */
OpenEdge.Logging.LoggerBuilder AddFilter (character, JsonObject) /* Adds a filter to the logger being built, with options in Json form @param character The filter name to add @param JsonObject The filter options @return LoggerBuilder This builder object */
OpenEdge.Logging.LoggerBuilder AddFilter (ILoggerFilter) /* Adds a filter to the logger being built @param ILoggerFilter The filter to add @return LoggerBuilder This builder object */
OpenEdge.Logging.LoggerBuilder Build (character) /* Returns a builder for a logger @param character The logger type @return LoggerBuilder A builder for that logger */
OpenEdge.Logging.LoggerBuilder Build (character, BuilderRegistry) /* Returns a builder for a logger @param character The logger type @param BuilderRegistry A registry of Filter writers to user @return LoggerBuilder A builder for that logger */
OpenEdge.Logging.ILogWriter BuildFilterLogger () /* Creates a default logger based that uses the config in this class @return ILogWriter A logger */
OpenEdge.Logging.LoggerBuilder FromConfig (JsonObject) /* Adds JSON configuration for loggers, fitlers and builders @param JsonObject The JSON configuration for a logger @return LoggerBuilder This builder object */
OpenEdge.Logging.ILogWriter GetLogger (character) /** Returns a logger (ILogWriter) @param character The logger name @return ILogWriter An instance of the default logger */
OpenEdge.Logging.ILogWriter GetLogger (handle) /** Returns a logger (ILogWriter). @param handle The procedure for which to find a logger @return ILogWriter An instance of the default logger */
OpenEdge.Logging.ILogWriter GetLogger (Class) /** Returns a logger (ILogWriter). @param P.L.Class The typename for which to find a logger @return ILogWriter An instance of the default logger */
OpenEdge.Logging.ILogWriter GetLoggerInstance () /* Constructs the actual logger instance @return ILogWriter A new or cached logged */
OpenEdge.Logging.LoggerBuilder LogAt (LogLevelEnum) /* Sets the log level for this logger. @param LogLevelEnum the level to log at @return LoggerBuilder This builder object */
LogMessage (character, LogLevelEnum) /* Logs error/messages that are written before a logger instance is successfully built. ONLY for use by the LoggerBuilder (hence protected). This is intentionally a very primitive log writer. Messages are written to the first location found by the algorithm below 1. If a log-manager exists, write there. This will always be the case on a server (PASOE or Classic A/S & WS) 2. The session's temp-dir in a file called loggerbuilder.log Messages are APPENDED to the output file @param character The message to write @param LogLevelEnum The level of the message */

Constructor Summary
Options Name Purpose
LoggerBuilder () /* Static constructor */
LoggerBuilder (character) /* Constructor @param character The logger type being built */

Property Summary
Options Name Purpose
CHARACTER DefaultLogger
OpenEdge.Logging.ILogWriter Logger
CHARACTER LoggerType
OpenEdge.Core.Util.BuilderRegistry Registry


Method Detail
Top

OpenEdge.Logging.LoggerBuilder AddFilter (character)

/* Adds a filter to the logger being built
Parameters:
pcFilterName CHARACTER
Returns OpenEdge.Logging.LoggerBuilder
LoggerBuilder This builder object
Top

OpenEdge.Logging.LoggerBuilder AddFilter (character, JsonObject)

/* Adds a filter to the logger being built, with options in Json form
Parameters:
pFilterName CHARACTER
pFilterOptions Progress.Json.ObjectModel.JsonObject
Returns OpenEdge.Logging.LoggerBuilder
LoggerBuilder This builder object
Top

OpenEdge.Logging.LoggerBuilder AddFilter (ILoggerFilter)

/* Adds a filter to the logger being built
Parameters:
pFilter OpenEdge.Logging.Filter.ILoggerFilter
Returns OpenEdge.Logging.LoggerBuilder
LoggerBuilder This builder object
Top

OpenEdge.Logging.LoggerBuilder Build (character)

/* Returns a builder for a logger
Parameters:
pcLoggerType CHARACTER
Returns OpenEdge.Logging.LoggerBuilder
LoggerBuilder A builder for that logger
Top

OpenEdge.Logging.LoggerBuilder Build (character, BuilderRegistry)

/* Returns a builder for a logger
Parameters:
pcLoggerType CHARACTER
poBuilders OpenEdge.Core.Util.BuilderRegistry
Returns OpenEdge.Logging.LoggerBuilder
LoggerBuilder A builder for that logger
Top

OpenEdge.Logging.ILogWriter BuildFilterLogger ()

/* Creates a default logger based that uses the config in this class
Returns OpenEdge.Logging.ILogWriter
ILogWriter A logger
Top

OpenEdge.Logging.LoggerBuilder FromConfig (JsonObject)

/* Adds JSON configuration for loggers, fitlers and builders
Parameters:
pJsonConfig Progress.Json.ObjectModel.JsonObject
Returns OpenEdge.Logging.LoggerBuilder
LoggerBuilder This builder object
Top

OpenEdge.Logging.ILogWriter GetLogger (character)

Purpose: Returns a logger (ILogWriter)
Parameters:
pcLoggerType CHARACTER
Returns OpenEdge.Logging.ILogWriter
ILogWriter An instance of the default logger
Top

OpenEdge.Logging.ILogWriter GetLogger (handle)

Purpose: Returns a logger (ILogWriter).
Parameters:
pLoggerType HANDLE
Returns OpenEdge.Logging.ILogWriter
ILogWriter An instance of the default logger
Top

OpenEdge.Logging.ILogWriter GetLogger (Class)

Purpose: Returns a logger (ILogWriter).
Parameters:
poLoggerType Progress.Lang.Class
Returns OpenEdge.Logging.ILogWriter
ILogWriter An instance of the default logger
Top

OpenEdge.Logging.ILogWriter GetLoggerInstance ()

/* Constructs the actual logger instance
Returns OpenEdge.Logging.ILogWriter
ILogWriter A new or cached logged
Top

OpenEdge.Logging.LoggerBuilder LogAt (LogLevelEnum)

/* Sets the log level for this logger.
Parameters:
poLevel OpenEdge.Logging.LogLevelEnum
Returns OpenEdge.Logging.LoggerBuilder
LoggerBuilder This builder object
Top

LogMessage (character, LogLevelEnum)

/* Logs error/messages that are written before a logger instance is successfully built.
ONLY for use by the LoggerBuilder (hence protected). This is intentionally a very
primitive log writer.
Messages are written to the first location found by the algorithm below
1. If a log-manager exists, write there. This will always be the case on a server (PASOE or Classic A/S & WS)
2. The session's temp-dir in a file called loggerbuilder.log
Messages are APPENDED to the output file
Parameters:
pMessage CHARACTER
pLevel OpenEdge.Logging.LogLevelEnum


Constructor Detail
Top

STATIC LoggerBuilder ()

/* Static constructor
Top

LoggerBuilder (character)

/* Constructor
Parameters:
pcLoggerType CHARACTER


Property Detail
Top

CHARACTER DefaultLogger

Returns CHARACTER
Top

OpenEdge.Logging.ILogWriter Logger

Returns OpenEdge.Logging.ILogWriter
Top

CHARACTER LoggerType

Returns CHARACTER
Top

OpenEdge.Core.Util.BuilderRegistry Registry

Returns OpenEdge.Core.Util.BuilderRegistry


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15