Changeset 2173 for coldbox/trunk/system/logging/AbstractLogger.cfc
- Timestamp:
- 04/04/09 01:16:51 (4 years ago)
- Files:
-
- 1 modified
-
coldbox/trunk/system/logging/AbstractLogger.cfc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
coldbox/trunk/system/logging/AbstractLogger.cfc
r2091 r2173 16 16 <cfscript> 17 17 instance = structnew(); 18 /* Logger Name */ 19 instance.name = ""; 20 /* Logger Unique ID */ 21 instance._hash = ""; 22 /* Flag denoting if the logger is inited or not */ 23 instance.isLoggerInitialized = false; 24 /* The log levels map */ 25 instance.logLevels = structnew(); 26 /* The current set logging level */ 27 instance.logLevel = 0; 28 /* Logger Configuration Properties */ 29 instance.properties = structnew(); 18 30 </cfscript> 19 31 20 32 <!--- Init ---> 21 33 <cffunction name="init" access="public" returntype="AbstractLogger" hint="Constructor" output="false" > 22 <cfargument name="name" type="string" required="true" hint="The logger identification name"> 34 <!--- ************************************************************* ---> 35 <cfargument name="name" type="string" required="true" hint="The logger identification name"> 36 <cfargument name="properties" type="struct" required="false" default="#structnew()#" hint="A map of configuration properties for the logger"/> 37 <!--- ************************************************************* ---> 23 38 <cfscript> 24 /* Create the identification name */39 /* Prepare Instance */ 25 40 instance.name = arguments.name; 26 /* Unique Instance ID for the object. */ 27 instance._hash = hash(createUUID()&instance.name); 28 /* Flag denoting if the logger is inited or not */ 29 instance.isLoggerInitialized = false; 30 /* The log levels map */ 31 instance.logLevels = structnew(); 32 /* The current set logging level */ 33 instance.logLevel = 0; 34 /* Logger Configuration Properties */ 35 instance.properties = structnew(); 36 41 instance._hash = hash(createUUID()&instance.name); 42 instance.properties = arguments.properties; 37 43 return this; 38 44 </cfscript> … … 46 52 47 53 <!--- Get/Set Logger Name ---> 48 <cffunction name="getname" access="public" output="false" returntype="string" hint="Get name">54 <cffunction name="getname" access="public" output="false" returntype="string" hint="Get the logger's name"> 49 55 <cfreturn instance.name/> 50 56 </cffunction> 51 <cffunction name="setname" access="public" output="false" returntype="void" hint="Set name">57 <cffunction name="setname" access="public" output="false" returntype="void" hint="Set/Override the logger's name"> 52 58 <cfargument name="name" type="string" required="true"/> 53 59 <cfset instance.name = arguments.name/> … … 126 132 127 133 <!--- Log An Entry ---> 128 <cffunction name="logEntry" access="public" hint="Log a message" output="false" returntype="void">134 <cffunction name="logEntry" access="public" output="false" returntype="void" hint="Log a message"> 129 135 <!--- ************************************************************* ---> 130 136 <cfargument name="Severity" type="string" required="yes" hint="The severity level to log">
