Está en la página 1de 7

Metodos de la Clase logger

Equals(Object) Determina si el objeto Object especificado es igual al objeto Object actual. (Se hereda de Object).

Finalize Permite que un objeto intente liberar recursos y realizar otras operaciones de limpieza antes de ser reclamado por la recoleccin de elementos no utilizados. (Se hereda de Object).

FormatErrorEvent Genera un mensaje de error con formato predeterminado a partir de un objeto BuildErrorEventArgs.

FormatWarningEvent Genera un mensaje de advertencia con formato predeterminado a partir de un objetoBuildWarningEventArgs.

GetHashCode Acta como funcin hash para un tipo concreto. (Se hereda de Object).

GetType Obtiene el objeto Type de la instancia actual. (Se hereda de Object).

Initialize Cuando se reemplaza en una clase derivada, suscribe el registrador a eventos concretos.

IsVerbosityAtLeast Determina si la actual configuracin de Verbosity es al menos el valor que se ha pasado.

MemberwiseClone Crea una copia superficial del objeto Object actual. (Se hereda de Object).

Shutdown Cuando se reemplaza en una clase derivada, libera los recursos asignados al registrador en el momento de la inicializacin o durante la generacin.

ToString Devuelve una cadena que representa el objeto actual. (Se hereda de Object). Anex. Cmo utilizar Logger en cualquier aplicacin Java. Registrador tiene que configurar Formatter y controlador. Hay muchos tipos de controladores y formateadores presentes. En este FileHandler ejemplo se utiliza para almacenar todos los mensajes de log en un archivo de registro. Y formateador simple se utiliza para dar formato a los mensajes de registro en forma legible por humanos. paquete de MyProject; importacin java.io.IOException; importar java.util.logging.FileHandler; importar java.util.logging.Level; importar java.util.logging.Logger; importar java.util.logging.SimpleFormatter; pblica MyLogger la clase { public static void main (String [] args) { Logger logger = Logger.getLogger ("MyLog"); FileHandler FH; try { / / Este bloque de configurar el registrador con el manejador y el formateador fh = new FileHandler ("c: \ \ MyLogFile.log", true); logger.addHandler (FH); logger.setLevel (Level.ALL); SimpleFormatter formateador = new SimpleFormatter (); fh.setFormatter (formateador); / / La siguiente instruccin se utiliza para registrar los mensajes logger.log (Level.WARNING, "Mi primer registro"); } Catch (SecurityException e) { e.printStackTrace (); } Catch (Exception e) { e.printStackTrace (); }

Metodos de la clase Level

Equals Determines whether this instance of Level is equal to another instance of Level. (InvalidaObject..::..Equals(Object).)

Finalize (Se hereda de Object.)

GetHashCode Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures such as hash tables. (Invalida Object..::..GetHashCode()()()().)

GetMembers()()()() Returns a MemberCollection that contains a collection of members for the Level. Note This method loads all members of the level. If there are a large number of members, this method may take a long time to execute.

GetMembers(Int64, Int64) Returns a MemberCollection that contains a collection of members for the Level. The returned object contains up to count members, and begins at the position indicated by the startparameter.

GetMembers(Int64, Int64,array<MemberFilter>[]()[][]) Returns a MemberCollection that contains a collection of members for the Level. The returned object contains up to count members, begins at the position indicated by the start parameter, and is filtered by the filters parameter.

GetMembers(Int64, Int64,array<String>[]()[][],array<MemberFilter>[]()[][]) Returns a MemberCollection that contains a collection of members for the Level. The returned object contains up to count members, begins at the position indicated by the start parameter, and is filtered by the filters parameter. Each member caches the properties indicated by theArray passed into the properties parameter. Note For performance reasons, this overload should only be used if non-default member properties are needed.

GetType (Se hereda de Object.)

MemberwiseClone (Se hereda de Object.)

ToString Returns a String that represents the current Object. (Invalida Object..::..ToString()()()().)

AddToContainer Infraestructura. (Se hereda de ModelComponent).

AfterInsert Infraestructura. (Se hereda de ModelComponent).

AfterMove Infraestructura. (Se hereda de ModelComponent).

AfterRemove Infraestructura. (Se hereda de ModelComponent).

BeforeRemove Infraestructura. (Se hereda de ModelComponent).

Clone Creates a new full copy of an object.

CopyTo(Level) Copies a Level object to the specified object.

CopyTo Infraestructura. (Se hereda de ModelComponent).

CopyTo(NamedComponent) (Se hereda de NamedComponent).

CreateObjRef (Se hereda de MarshalByRefObject).

Dispose (Se hereda de Component).

Dispose (Se hereda de Component).

GetHashCode (Se hereda de Object).

GetLifetimeService (Se hereda de MarshalByRefObject).

GetService (Se hereda de Component).

InitializeLifetimeService

(Se hereda de MarshalByRefObject).

MemberwiseClone (Se hereda de Object).

MemberwiseClone (Se hereda de MarshalByRefObject).

RemoveFromContainer Infraestructura. (Se hereda de ModelComponent).

Reset (Se hereda de NamedComponent).

Submit()()()() Infraestructura. (Se hereda de ModelComponent).

Submit(Boolean) Infraestructura. (Se hereda de ModelComponent).

Validate(ValidationErrorCollection) Validates the element to which it is appended; returns any errors encountered in a collection. (Se hereda de ModelComponent).

Validate(ValidationErrorCollection, Boolean) Validates the element to which it is appended; returns any errors encountered in a collection. Also contains a parameter to enable return of detailed errors. (Se hereda deModelComponent).

Validate(ValidationErrorCollection, Boolean, ServerEdition)

(Invalida NamedComponent..::..Validate(ValidationErrorCollection, Boolean, ServerEdition)

También podría gustarte