GUJ Discussões   :   últimos tópicos   |   categorias   |   GUJ Respostas

Gravar arquivos de log com log4j

No arquivo de properties está assim:

log4j.rootLogger=ERROR,console
log4j.logger.br.com.pacote1=ALL, rolling1

log4j.appender.rolling1=org.apache.log4j.RollingFileAppender
log4j.appender.rolling1.File=nota/servidor.log
log4j.appender.rolling1.MaxFileSize=256KB
log4j.appender.rolling1.MaxBackupIndex=4
log4j.appender.rolling1.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling1.layout.ConversionPattern=%r [%t] %-5p %c %x - %m%n

No console gerou estas informações:

11:22:50: Executing task 'UninfeIntegracaoApplication.main()'...

Starting Gradle Daemon...
Connected to the target VM, address: '127.0.0.1:51605', transport: 'socket'
Gradle Daemon started in 4 s 235 ms
:compileJava UP-TO-DATE
:processResources
:classes
:UninfeIntegracaoApplication.main()Connected to the VM started by ':UninfeIntegracaoApplication.main()' (localhost:51617). Open the debugger session tab

11:23:08.456 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
11:23:08.463 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Excluded patterns for restart : [/spring-boot-starter/target/classes/, /spring-boot-autoconfigure/target/classes/, /spring-boot-starter-[\w-]+/, /spring-boot/target/classes/, /spring-boot-actuator/target/classes/, /spring-boot-devtools/target/classes/]
11:23:08.466 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/C:/Docker/workspace/uninfe-integracao/uninfe-integracao/build/classes/main/, file:/C:/Docker/workspace/uninfe-integracao/uninfe-integracao/build/resources/main/]

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.9.RELEASE)

2020-06-29 11:23:09.542  INFO 58784 --- [  restartedMain] b.c.c.u.i.UninfeIntegracaoApplication    : Starting UninfeIntegracaoApplication on DESKTOP-5AHUKKM with PID 58784 (C:\Docker\workspace\uninfe-integracao\uninfe-integracao\build\classes\main started by Usuario in C:\Docker\workspace\uninfe-integracao\uninfe-integracao)
2020-06-29 11:23:09.546  INFO 58784 --- [  restartedMain] b.c.c.u.i.UninfeIntegracaoApplication    : No active profile set, falling back to default profiles: default
2020-06-29 11:23:09.775  INFO 58784 --- [  restartedMain] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@183d17c2: startup date [Mon Jun 29 11:23:09 BRT 2020]; root of context hierarchy
2020-06-29 11:23:15.264  INFO 58784 --- [  restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8081 (http)
2020-06-29 11:23:15.290  INFO 58784 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-06-29 11:23:15.292  INFO 58784 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.23
2020-06-29 11:23:15.633  INFO 58784 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/nota]   : Initializing Spring embedded WebApplicationContext
2020-06-29 11:23:15.634  INFO 58784 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 5865 ms
2020-06-29 11:23:16.093  INFO 58784 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2020-06-29 11:23:16.094  INFO 58784 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2020-06-29 11:23:16.095  INFO 58784 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2020-06-29 11:23:16.096  INFO 58784 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2020-06-29 11:23:16.097  INFO 58784 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'corsFilter' to: [/*]
2020-06-29 11:23:16.097  INFO 58784 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2020-06-29 11:23:17.005  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@183d17c2: startup date [Mon Jun 29 11:23:09 BRT 2020]; root of context hierarchy
2020-06-29 11:23:17.147  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/nfse/consultar],methods=[POST],produces=[application/xml]}" onto public java.lang.String br.com.contabilix.uninfe.integracao.rest.nfse.ConsultarRest.ultima(br.com.contabilix.uninfe.integracao.common.ConsultarNfseEnvio) throws java.io.IOException
2020-06-29 11:23:17.149  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/nfse/rps/consulta],methods=[POST],produces=[application/xml]}" onto public java.lang.String br.com.contabilix.uninfe.integracao.rest.nfse.ConsultarRPSRest.ultima(br.com.contabilix.uninfe.integracao.common.LoteRPS) throws java.io.IOException
2020-06-29 11:23:17.150  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/nfse/rps],methods=[POST],produces=[application/xml]}" onto public java.lang.String br.com.contabilix.uninfe.integracao.rest.nfse.GerarRPSRest.ultima(br.com.contabilix.uninfe.integracao.common.LoteRPS) throws java.io.IOException
2020-06-29 11:23:17.151  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/nfse],methods=[GET],produces=[application/xml]}" onto public java.lang.String br.com.contabilix.uninfe.integracao.rest.nfse.Home.home()
2020-06-29 11:23:17.160  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/nfe/{operacao}/{cnpj}],methods=[POST],consumes=[application/xml],produces=[application/xml]}" onto public java.lang.String br.com.contabilix.uninfe.integracao.rest.nfse.NFeRest.operacao(java.lang.String,java.lang.String,java.lang.String) throws java.io.IOException
2020-06-29 11:23:17.163  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/nfe/{prefixo}/{operacao}/{cnpj}],methods=[POST],consumes=[application/xml],produces=[application/xml]}" onto public java.lang.String br.com.contabilix.uninfe.integracao.rest.nfse.NFeRest.prefixoOperacao(java.lang.String,java.lang.String,java.lang.String,java.lang.String) throws java.io.IOException
2020-06-29 11:23:17.177  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/nfe/empresa/salva],methods=[POST],consumes=[application/xml],produces=[application/xml]}" onto public java.lang.String br.com.contabilix.uninfe.integracao.rest.nfse.NFeRest.salvarEmpresa(java.lang.String) throws java.io.IOException
2020-06-29 11:23:17.180  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/nfe/certificado],methods=[POST || GET],consumes=[application/xml],produces=[application/xml]}" onto public java.lang.String br.com.contabilix.uninfe.integracao.rest.nfse.NFeRest.consultaStautusCertificados() throws java.io.IOException
2020-06-29 11:23:17.183  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/nfe/certificado/salva],methods=[POST],consumes=[application/xml],produces=[application/xml]}" onto public java.lang.String br.com.contabilix.uninfe.integracao.rest.nfse.NFeRest.salvarCertificado(java.lang.String) throws java.io.IOException
2020-06-29 11:23:17.185  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/nfse/{operacao}/{cnpj}],methods=[POST],consumes=[application/xml],produces=[application/xml]}" onto public java.lang.String br.com.contabilix.uninfe.integracao.rest.nfse.NFSeRest.operacao(java.lang.String,java.lang.String,java.lang.String) throws java.io.IOException
2020-06-29 11:23:17.186  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/nfse/{prefixo}/{operacao}/{cnpj}],methods=[POST],consumes=[application/xml],produces=[application/xml]}" onto public java.lang.String br.com.contabilix.uninfe.integracao.rest.nfse.NFSeRest.prefixoOperacao(java.lang.String,java.lang.String,java.lang.String,java.lang.String) throws java.io.IOException
2020-06-29 11:23:17.192  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2020-06-29 11:23:17.193  INFO 58784 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2020-06-29 11:23:17.286  INFO 58784 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-06-29 11:23:17.289  INFO 58784 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-06-29 11:23:17.408  INFO 58784 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-06-29 11:23:17.702  INFO 58784 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2020-06-29 11:23:18.192  INFO 58784 --- [  restartedMain] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2020-06-29 11:23:18.303  INFO 58784 --- [  restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8081 (http)
2020-06-29 11:23:18.314  INFO 58784 --- [  restartedMain] b.c.c.u.i.UninfeIntegracaoApplication    : Started UninfeIntegracaoApplication in 9.808 seconds (JVM running for 11.09)
2020-06-29 11:23:39.719  INFO 58784 --- [.0-8081-exec-10] o.a.c.c.C.[Tomcat].[localhost].[/nota]   : Initializing Spring FrameworkServlet 'dispatcherServlet'
2020-06-29 11:23:39.720  INFO 58784 --- [.0-8081-exec-10] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2020-06-29 11:23:39.792  INFO 58784 --- [.0-8081-exec-10] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 68 ms
2020-06-29 11:23:39.877  INFO 58784 --- [.0-8081-exec-10] b.c.c.u.integracao.service.NFSeService   : Arquivo criado: C:/Unimake/UniNFe/24199855000151/nfse/Envio/41dc4699e3c747229e6eec787fb8758c-ped-sitnfse.xml
2020-06-29 11:23:39.877  INFO 58784 --- [.0-8081-exec-10] b.c.c.u.integracao.service.NFSeService   : sitnfse
2020-06-29 11:23:49.881  INFO 58784 --- [      Thread-10] b.c.c.u.integracao.service.NFSeService   : sucessoEnvioNota
2020-06-29 11:23:49.883  INFO 58784 --- [.0-8081-exec-10] b.c.c.u.integracao.service.NFSeService   : fileWatcher.isAlive() : false
2020-06-29 11:23:49.883  INFO 58784 --- [.0-8081-exec-10] b.c.c.u.integracao.service.NFSeService   : Nota OK
2020-06-29 11:23:49.896 ERROR 58784 --- [.0-8081-exec-10] b.c.c.u.integracao.service.NFSeService   : C:\Unimake\UniNFe\24199855000151\nfse\Retorno\41dc4699e3c747229e6eec787fb8758c-ret-sitnfse.xml

java.nio.file.NoSuchFileException: C:\Unimake\UniNFe\24199855000151\nfse\Retorno\41dc4699e3c747229e6eec787fb8758c-ret-sitnfse.xml
	at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79) ~[na:1.8.0_241]
	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) ~[na:1.8.0_241]
	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) ~[na:1.8.0_241]
	at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:230) ~[na:1.8.0_241]
	at java.nio.file.Files.newByteChannel(Files.java:361) ~[na:1.8.0_241]
	at java.nio.file.Files.newByteChannel(Files.java:407) ~[na:1.8.0_241]
	at java.nio.file.Files.readAllBytes(Files.java:3152) ~[na:1.8.0_241]
	at br.com.contabilix.uninfe.integracao.service.NFSeService.lerRetorno(NFSeService.java:84) [main/:na]
	at br.com.contabilix.uninfe.integracao.service.NFSeService.executarOperacao(NFSeService.java:29) [main/:na]
	at br.com.contabilix.uninfe.integracao.rest.nfse.NFSeRest.operacao(NFSeRest.java:30) [main/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_241]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_241]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_241]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_241]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_241]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_241]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_241]

2020-06-29 11:23:49.899  INFO 58784 --- [.0-8081-exec-10] b.c.c.u.integracao.service.NFSeService   : retorno: sem erros

Não consegui achar o arquivo nota/servidor.log

Onde ele fica ?

Veja se não apareceu a pasta “nota” na raiz do projeto.

1 Curtida

Não

Não grava o arquivo

O que pode ser ?

Reparei agora que o nome do pacote br.com.pacote1 não corresponde com algum pacote do seu projeto.

1 Curtida

Alterei para

log4j.rootLogger=ERROR,console
log4j.logger.br.com.contabilix=ALL, rolling1

log4j.appender.rolling1=org.apache.log4j.RollingFileAppender
log4j.appender.rolling1.File=servidor.log
log4j.appender.rolling1.MaxFileSize=256KB
log4j.appender.rolling1.MaxBackupIndex=4
log4j.appender.rolling1.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling1.layout.ConversionPattern=%r [%t] %-5p %c %x - %m%n

package principal br.com.contabilix.uninfe.integracao;

Qual a versão do log4j que vc está usando?

1.7.25

logger

//