> For the complete documentation index, see [llms.txt](https://docs.editran.onesait.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.editran.onesait.com/documentacion-editran/editran-sepa-v3/configuracion-del-log.md).

# Configuración del log

El fichero `log4j.properties` situado en la carpeta `conf` permite modificar las características del log. Por defecto, el log está configurado de tal forma que para cada conversión de ficheros se generen dos informaciones de log situadas en la carpeta `logs`, uno en el log general de Editran/SEPA llamado `out.log` y otro particular propio para cada fichero con nombre igual a su fichero de entrada.

El fichero es editable, lo que permite adaptarlo a las necesidades o requerimientos concretos de cada instalación. Se enumeran a continuación ejemplos de algunas de las modificaciones más comunes:

* Desactivar algún log: eliminar su nombre (`EDISEPAGENERAL`, `EDISEPAFICHERO` o `EDISEPAEMAIL`) de las propiedades del log (`log4j.logger`, `log4j.logger.com.indra.mmdd` o `log4j.logger.com.indra.mmdd.editran.parser`).
* Editar el log general: se puede modificar desde el nombre del log (`log4j.appender.EDISEPAGENERAL.File`), su tamaño máximo (`log4j.appender.EDISEPAGENERAL.MaxFileSize`) hasta el número de ficheros históricos que se guardan (`log4j.appender.EDISEPAGENERAL.MaxBackupIndex`).
* El fichero viene preparado con dos bloques, 1) y 2) para activar/desactivar fácilmente el uso de envío de errores por correo electrónico.
* Añadir algún log más: si se quiere realizar esta tarea se debe seguir la configuración de logs de log4j.

Contenido inicial del fichero:

*(Las líneas que comienzan por `##` son comentarios y deben permanecer tal cual. Las líneas activas siempre comenzarán por `log4j.`. Para deshabilitar una línea anteponer `#`, para habilitarla eliminar `#`.)*

```properties
## Por defecto, el envio de errores por correo electronico esta deshabilitado.

##Para desactivar cualquiera de los logs debe eliminar su nombre (EDISEPAGENERAL,
##EDISEPAFICHERO o EDISEPAEMAIL) de las líneas donde aparecen a la derecha del '='
##así como comentar el bloque donde se define.

##Solo deben estar activas las lineas de uno de los dos siguientes bloques:

##1) LOG GENERAL, LOG PARTICULAR DE CADA FICHERO Y ENVIO DE LOG DE ERRORES POR CORREO ECTRONICO
##Si se utiliza este bloque se deben activar, siguiendo las instrucciones alli especificadas,
##las lineas de CONFIGURACION PARA EL ENVIO DE ERRORES POR CORREO ELECTRONICO
#log4j.logger = INFO, EDISEPAGENERAL, EDISEPAFICHERO, EDISEPAEMAIL
#log4j.logger.com.indra.mmdd = INFO, EDISEPAGENERAL, EDISEPAEMAIL
#log4j.logger.com.indra.mmdd.editran.parser = INFO, EDISEPAFICHERO, EDISEPAEMAIL

##2) LOG GENERAL y LOG PARTICULAR DE CADA FICHERO
log4j.logger = INFO, EDISEPAGENERAL, EDISEPAFICHERO
log4j.logger.com.indra.mmdd = INFO, EDISEPAGENERAL, EDISEPAFICHERO
log4j.logger.com.indra.mmdd.editran.parser = INFO, EDISEPAFICHERO

##
log4j.additivity.com.indra.mmdd =false

##Log general del programa. Incluye todos las conversiones de ficheros. Si quiere modificar el
##tamaño de log debe modificar la propiedad log4j.appender.MaxFileSize. Si quiere modificar el
##numero de ficheros historicos guardados de log modificar la propiedad log4j.appender.MaxBackupIndex
log4j.appender.EDISEPAGENERAL=org.apache.log4j.RollingFileAppender
log4j.appender.EDISEPAGENERAL.File=logs/out.log
log4j.appender.EDISEPAGENERAL.MaxFileSize=2000KB
log4j.appender.EDISEPAGENERAL.MaxBackupIndex=5
log4j.appender.EDISEPAGENERAL.Append=true
log4j.appender.EDISEPAGENERAL.layout=org.apache.log4j.PatternLayout
log4j.appender.EDISEPAGENERAL.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss,SSS} %5r %-5p [%t] %c{2} %M - %m%n

##Log propio de la conversion de cada fichero. El nombre final es
##"nombreDeFicheroDeEntrada.log", situado en la carpeta logs
log4j.appender.EDISEPAFICHERO=org.apache.log4j.FileAppenderr
log4j.appender.EDISEPAFICHERO.File=logs/nombreFichero.log
log4j.appender.EDISEPAFICHERO.Append=false
log4j.appender.EDISEPAFICHERO.layout=org.apache.log4j.PatternLayout
log4j.appender.EDISEPAFICHERO.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss,SSS} %-5p - %m%n

##CONFIGURACION PARA EL ENVIO DE ERRORES POR CORREO ELECTRONICO
##La password de la cuenta desde la que se enviaran los correos aparecera en claro, configure
##una cuenta que no la requiera si desea evitarlo.
#log4j.appender.EDISEPAEMAIL=org.apache.log4j.net.SMTPAppender
##En los siguientes seis parametros sustituya a la derecha de '=' los valores de ejemplo por los
##reales correspondientes tanto a su servidor SMTP, como a los usuarios remitente y destinatario de los correos.
#log4j.appender.EDISEPAEMAIL.SMTPHost=smtp.dominio
#log4j.appender.EDISEPAEMAIL.smtp.Port=25
#log4j.appender.EDISEPAEMAIL.SMTPUsername=remitente@dominioRemitente
#log4j.appender.EDISEPAEMAIL.SMTPPassword=passwordRemitente
#log4j.appender.EDISEPAEMAIL.From=remitente@dominioRemitente
#log4j.appender.EDISEPAEMAIL.To=destinatario@dominioDestinatario
#log4j.appender.EDISEPAEMAIL.Subject=Error del Conversor Editran/SEPA
#log4j.appender.EDISEPAEMAIL.BufferSize=1
#log4j.appender.EDISEPAEMAIL.layout=org.apache.log4j.PatternLayout
#log4j.appender.EDISEPAEMAIL.layout.ConversionPattern=%m
```

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.editran.onesait.com/documentacion-editran/editran-sepa-v3/configuracion-del-log.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
