FEAT: Arquivos de logs possuem ciclo de vida de 10 dias

This commit is contained in:
Rafael Alves Lopes 2025-11-11 09:17:08 -03:00
parent 77d07eadcc
commit 9019dbe58f
8 changed files with 119 additions and 3763 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
node_modules/
logs/
.env.production

File diff suppressed because it is too large Load Diff

View File

@ -1,113 +0,0 @@
{"level":"error","message":"AggregateError - Erro ao obter ID de sync_data","timestamp":"2025-11-06 16:13:35"}
{"level":"error","message":"AggregateError - Erro ao obter ID de sync_data","timestamp":"2025-11-06 16:14:44"}
{"level":"error","message":"AggregateError - Erro ao obter ID de sync_data","timestamp":"2025-11-06 16:15:03"}
{"level":"error","message":"AggregateError - Erro ao obter ID de sync_data","timestamp":"2025-11-06 16:15:40"}
{"level":"error","message":"AggregateError - Erro ao obter ID de sync_data","timestamp":"2025-11-06 16:15:41"}
{"level":"error","message":" - Erro ao processar atendimentos: AggregateError","timestamp":"2025-11-06 16:17:18"}
{"level":"error","message":" - Erro ao processar atendimentos: AggregateError","timestamp":"2025-11-06 16:17:54"}
{"level":"error","message":" - Erro ao processar atendimentos: AggregateError","timestamp":"2025-11-06 16:18:42"}
{"level":"error","message":"AggregateError - [ETAPA 1 FALHOU] Erro crítico ao buscar ou salvar dados do HubSoft. Verifique a conexão com o banco de dados do HubSoft e do HubGLPI.","timestamp":"2025-11-06 16:34:35"}
{"level":"error","message":"AggregateError - [ETAPA 1 FALHOU] Erro crítico ao buscar ou salvar dados do HubSoft. Verifique a conexão com o banco de dados do HubSoft e do HubGLPI.","timestamp":"2025-11-06 16:34:57"}
{"level":"error","message":"AggregateError - [ETAPA 1 FALHOU] Erro crítico ao buscar ou salvar dados do HubSoft. Verifique a conexão com o banco de dados do HubSoft e do HubGLPI.","timestamp":"2025-11-06 16:36:29"}
{"level":"error","message":"AggregateError - [ETAPA 1 FALHOU] Erro crítico ao buscar ou salvar dados do HubSoft. Verifique a conexão com o banco de dados do HubSoft e do HubGLPI.","timestamp":"2025-11-06 16:43:44"}
{"level":"error","message":"AggregateError - [ETAPA 1 FALHOU] Erro crítico ao buscar ou salvar dados do HubSoft. Verifique a conexão com o banco de dados do HubSoft e do HubGLPI.","timestamp":"2025-11-06 16:52:42"}
{"level":"error","message":"AggregateError - [ETAPA 1 FALHOU] Erro crítico ao buscar ou salvar dados do HubSoft. Verifique a conexão com o banco de dados do HubSoft e do HubGLPI.","timestamp":"2025-11-06 16:56:57"}
{"level":"error","message":"AggregateError - Erro ao buscar atendimentos no banco de dados HubSoft.","timestamp":"2025-11-06 17:00:17"}
{"level":"error","message":"AggregateError - Erro ao buscar atendimentos no banco de dados HubSoft.","timestamp":"2025-11-06 17:00:59"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:49"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:50"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:50"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:50"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:50"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:50"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:50"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:50"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:50"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:50"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:51"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:51"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:51"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:51"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:51"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:05:51"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:10"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:11"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:12"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:12"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:12"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:12"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:06:12"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:11:17"}
{"level":"error","message":" - Erro ao buscar entidade por código de cliente: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY ASC' at line 1","timestamp":"2025-11-06 17:11:57"}
{"level":"error","message":" - Erro ao buscar entidade por código de serviço: Error: Access denied for user 'snglpi'@'177.73.177.3' (using password: YES)","timestamp":"2025-11-06 17:25:25"}
{"level":"error","message":"AggregateError - Erro ao obter ID de sync_data","timestamp":"2025-11-07 15:10:48"}
{"level":"error","message":"AggregateError - Erro ao obter ID de sync_data","timestamp":"2025-11-07 15:17:18"}
{"level":"error","message":"AggregateError - Erro ao obter ID de sync_data","timestamp":"2025-11-07 15:17:18"}
{"level":"error","message":"AggregateError - Erro ao obter ID de sync_data","timestamp":"2025-11-07 15:17:18"}
{"level":"error","message":"AggregateError - Erro ao obter ID de sync_data","timestamp":"2025-11-07 15:20:57"}
{"level":"error","message":"Error: connect ETIMEDOUT 177.73.177.69:9432 - Erro ao buscar atendimentos no banco de dados HubSoft.","timestamp":"2025-11-07 15:33:48"}
{"level":"error","message":"Error: connect ETIMEDOUT 177.73.177.69:9432 - [ETAPA 1 FALHOU] Erro crítico ao buscar ou salvar dados do HubSoft. Verifique a conexão com o banco de dados do HubSoft e do HubGLPI.","timestamp":"2025-11-07 15:33:48"}
{"level":"error","message":" - Falha ao atualizar status de sync_data para o glpi ticket ID 34335.","timestamp":"2025-11-10 11:44:23"}
{"level":"error","message":" - Falha ao fechar atendimento no HubSoft para o ticket ID 34335. Resposta: {\"status\":\"error\",\"msg\":\"Atendimento não identificado.\"}","timestamp":"2025-11-10 11:55:09"}
{"level":"error","message":" - Erro ao obter ID de sync_data, error: syntax error at or near \"FROM\"","timestamp":"2025-11-10 12:15:35"}
{"level":"error","message":" - Erro ao fechar atendimento no HubSoft para o ticket ID 34335: ReferenceError: updateFechaAtendimento is not defined","timestamp":"2025-11-10 12:23:41"}
{"level":"error","message":"Error: Client network socket disconnected before secure TLS connection was established - Erro ao obter token de autenticação:","timestamp":"2025-11-10 15:08:34"}
{"level":"error","message":"Client network socket disconnected before secure TLS connection was established - Erro ao fechar atendimento ID 2233:","timestamp":"2025-11-10 15:08:34"}
{"level":"error","message":" - Erro ao fechar atendimento no HubSoft para o ticket ID 34336: Error: Client network socket disconnected before secure TLS connection was established","timestamp":"2025-11-10 15:08:34"}
{"level":"error","message":"Error: Client network socket disconnected before secure TLS connection was established - Erro ao obter token de autenticação:","timestamp":"2025-11-10 15:08:34"}
{"level":"error","message":"Client network socket disconnected before secure TLS connection was established - Erro ao fechar atendimento ID 2233:","timestamp":"2025-11-10 15:08:34"}
{"level":"error","message":" - Erro ao fechar atendimento no HubSoft para o ticket ID 34336: Error: Client network socket disconnected before secure TLS connection was established","timestamp":"2025-11-10 15:08:34"}
{"level":"error","message":" - Erro ao obter ID de sync_data, Error: Connection terminated unexpectedly","timestamp":"2025-11-10 15:09:25"}
{"level":"error","message":" - Erro ao obter ID de sync_data, Error: Connection terminated unexpectedly","timestamp":"2025-11-10 15:09:49"}
{"level":"error","message":" - Requisição para fechar ticket recebida com corpo inválido ou ausente.","timestamp":"2025-11-10 15:16:36"}
{"level":"error","message":" - Erro no processo de fechamento do ticket GLPI ID 34336: Falha ao fechar atendimento no HubSoft: {\"status\":\"error\",\"msg\":\"Atendimento já finalizado\"}","timestamp":"2025-11-10 15:36:43"}
{"level":"error","message":"Error: Client network socket disconnected before secure TLS connection was established - Erro ao obter token de autenticação:","timestamp":"2025-11-10 15:56:33"}
{"level":"error","message":"Client network socket disconnected before secure TLS connection was established - Erro ao fechar atendimento ID 2239:","timestamp":"2025-11-10 15:56:33"}
{"level":"error","message":" - Erro no processo de fechamento do ticket GLPI ID 34342: Client network socket disconnected before secure TLS connection was established","timestamp":"2025-11-10 15:56:33"}
{"level":"error","message":" - Erro ao obter ID de sync_data, Error: Connection terminated unexpectedly","timestamp":"2025-11-10 15:58:23"}

45
node_modules/.package-lock.json generated vendored
View File

@ -451,6 +451,15 @@
"integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==",
"license": "MIT"
},
"node_modules/file-stream-rotator": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/file-stream-rotator/-/file-stream-rotator-0.6.1.tgz",
"integrity": "sha512-u+dBid4PvZw17PmDeRcNOtCP9CCK/9lRN2w+r1xIS7yOL9JFrIBKTvrYsxT4P0pGtThYTn++QS5ChHaUov3+zQ==",
"license": "MIT",
"dependencies": {
"moment": "^2.29.1"
}
},
"node_modules/finalhandler": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz",
@ -839,6 +848,15 @@
"node": ">= 0.6"
}
},
"node_modules/moment": {
"version": "2.30.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
"license": "MIT",
"engines": {
"node": "*"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@ -895,6 +913,15 @@
"node": ">=6.0.0"
}
},
"node_modules/object-hash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
"integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
"license": "MIT",
"engines": {
"node": ">= 6"
}
},
"node_modules/object-inspect": {
"version": "1.13.4",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
@ -1456,6 +1483,24 @@
"node": ">= 12.0.0"
}
},
"node_modules/winston-daily-rotate-file": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/winston-daily-rotate-file/-/winston-daily-rotate-file-5.0.0.tgz",
"integrity": "sha512-JDjiXXkM5qvwY06733vf09I2wnMXpZEhxEVOSPenZMii+g7pcDcTBt2MRugnoi8BwVSuCT2jfRXBUy+n1Zz/Yw==",
"license": "MIT",
"dependencies": {
"file-stream-rotator": "^0.6.1",
"object-hash": "^3.0.0",
"triple-beam": "^1.4.1",
"winston-transport": "^4.7.0"
},
"engines": {
"node": ">=8"
},
"peerDependencies": {
"winston": "^3"
}
},
"node_modules/winston-transport": {
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz",

48
package-lock.json generated
View File

@ -16,7 +16,8 @@
"node-cron": "^4.2.1",
"pg": "^8.16.3",
"qs": "^6.14.0",
"winston": "^3.18.3"
"winston": "^3.18.3",
"winston-daily-rotate-file": "^5.0.0"
}
},
"node_modules/@colors/colors": {
@ -466,6 +467,15 @@
"integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==",
"license": "MIT"
},
"node_modules/file-stream-rotator": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/file-stream-rotator/-/file-stream-rotator-0.6.1.tgz",
"integrity": "sha512-u+dBid4PvZw17PmDeRcNOtCP9CCK/9lRN2w+r1xIS7yOL9JFrIBKTvrYsxT4P0pGtThYTn++QS5ChHaUov3+zQ==",
"license": "MIT",
"dependencies": {
"moment": "^2.29.1"
}
},
"node_modules/finalhandler": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz",
@ -854,6 +864,15 @@
"node": ">= 0.6"
}
},
"node_modules/moment": {
"version": "2.30.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
"license": "MIT",
"engines": {
"node": "*"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@ -910,6 +929,15 @@
"node": ">=6.0.0"
}
},
"node_modules/object-hash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
"integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
"license": "MIT",
"engines": {
"node": ">= 6"
}
},
"node_modules/object-inspect": {
"version": "1.13.4",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
@ -1471,6 +1499,24 @@
"node": ">= 12.0.0"
}
},
"node_modules/winston-daily-rotate-file": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/winston-daily-rotate-file/-/winston-daily-rotate-file-5.0.0.tgz",
"integrity": "sha512-JDjiXXkM5qvwY06733vf09I2wnMXpZEhxEVOSPenZMii+g7pcDcTBt2MRugnoi8BwVSuCT2jfRXBUy+n1Zz/Yw==",
"license": "MIT",
"dependencies": {
"file-stream-rotator": "^0.6.1",
"object-hash": "^3.0.0",
"triple-beam": "^1.4.1",
"winston-transport": "^4.7.0"
},
"engines": {
"node": ">=8"
},
"peerDependencies": {
"winston": "^3"
}
},
"node_modules/winston-transport": {
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz",

View File

@ -16,6 +16,7 @@
"node-cron": "^4.2.1",
"pg": "^8.16.3",
"qs": "^6.14.0",
"winston": "^3.18.3"
"winston": "^3.18.3",
"winston-daily-rotate-file": "^5.0.0"
}
}

View File

@ -1,5 +1,5 @@
const { Router } = require('express');
const ticketController = require('./controller/ClosureController.js');
const ticketController = require('./controller/closureController.js');
const router = Router();

View File

@ -1,5 +1,6 @@
const winston = require('winston');
const path = require('path');
require('winston-daily-rotate-file');
const fs = require('fs');
// verifica se a pasta de logs existe, se não, cria
@ -20,19 +21,30 @@ const logger = winston.createLogger({
),
transports: [
// Log geral da aplicação
new winston.transports.File({
filename: path.join(logsDir, 'app.log'),
maxsize: 5242880, // 5MB
maxFiles: 5
new winston.transports.DailyRotateFile({
filename: path.join(logsDir, 'app-%DATE%.log'),
datePattern: 'YYYY-MM-DD',
zippedArchive: true,
maxSize: '5m',
maxFiles: '10d',
options: {
flags: 'w' // Usa 'w' para sobrescrever o arquivo no início de cada dia
}
}),
// Log de erros
new winston.transports.File({
filename: path.join(logsDir, 'error.log'),
new winston.transports.DailyRotateFile({
filename: path.join(logsDir, 'error-%DATE%.log'),
level: 'error',
maxsize: 5242880,
maxFiles: 3
}),
datePattern: 'YYYY-MM-DD',
zippedArchive: true,
maxSize: '5m',
maxFiles: '10d',
options: {
flags: 'w' // Usa 'w' para sobrescrever o arquivo no início de cada dia
}
})
],
});
// Log no console em desenvolvimento