Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

260
Views
¿Cómo puedo cambiar el identificador de nivel de registro impreso en el registro de JBoss EAP 7?

Necesito cambiar la forma en que JBoss imprime el nivel de registro en el archivo de registro, mostrando solo el primer carácter de la etiqueta del nivel de registro, para que

 19:13:01,183 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 61) Initializing Mojarra 2.2.12-jbossorg-2 ...

se convertirá

 19:13:01,183 I [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 61) Initializing Mojarra 2.2.12-jbossorg-2 for context '/MONService'

Intenté una combinación de cadenas de formato, pero no puedo obtener solo el primer carácter.

Me referí a la documentación de JBoss EAP 7 ( https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/configuration_guide/logging_with_jboss_eap ) y el Javadoc del formateador ( http://docs.oracle.com/ javase/7/docs/api/java/util/Formatter.html ) pero no pudo encontrar ninguna solución viable.

¿Alguien podría ayudar?

Gracias

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Probé este formato y funciona (al menos para JBoss AS 7.5):

 <pattern-formatter pattern="%d{HH:mm:ss,SSS} %1.1p [%c] (%t) %s%E%n"/>

Esto se configura en el standalone.xml:

 <subsystem xmlns="urn:jboss:domain:logging:1.5"> ... <periodic-rotating-file-handler name="FILE" autoflush="true"> <formatter> <named-formatter name="PATTERN"/> </formatter> <file relative-to="jboss.server.log.dir" path="server.log"/> <suffix value=".yyyy-MM-dd"/> <append value="true"/> </periodic-rotating-file-handler> ... <root-logger> <level name="ALL"/> <handlers> <handler name="FILE"/> </handlers> </root-logger> <formatter name="PATTERN"> <pattern-formatter pattern="%d{HH:mm:ss,SSS} %1.1p [%c] (%t) %s%E%n"/> </formatter> </subsystem>
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!