Add more information on the log report page

Antonio Junior8 months ago

By manipulating the LogRecord.java and StandardLoggingHandler.java files, I was able to insert more information on the log report page.

     Identificador	           Protocolo	                IP	                               Dados	                                                            Data/Hora
     861261024432722	              topin	              191.58.92.185	                 787801080d0a	                                     24/04/2024 17:34:04

I would like help if anyone knows which files are responsible for displaying this information in the server log, as I would like to improve this log page, which is already incredible, it would be even more complete by obtaining the information below. grateful to everyone.

2024-04-24 19:53:42  INFO: [Tbee04888] id: 861261024432722, time: 2024-04-24 19:38:02, lat: -5.92572, lon: -35.27341, speed: 2.2, course: 9.0
Anton Tananaev8 months ago

Probably what you're looking for is LogsPage.jsx.

Antonio Junior8 months ago

Anton, obrigado por responder. Desculpa se me expressei mal, eu já realizei algmas mudanças nessa página do front em conjunto com backend, inserindo a data/hora ao lado da coluna data e também o IP. o que eu gostaria de fazer seria inserir essas informações abaixo também na página LogsPage.jsx, mas não tive sucesso.

INFO: [Tb86b0301] id: imei-xxxxxxxxxxxx, time: 2024-04-25 11:27:51, lat: -5.92606, lon: -35.27318, speed: 2.7, course: 258.0

In the arquivoStandardLoggingHandler.java, I found this function, but the changes I made only reflect in the logs via ssh.

 private void log(ChannelHandlerContext ctx, boolean downstream, LogRecord record) {
        if (record != null) {
            StringBuilder message = new StringBuilder();
            message.append("[").append(NetworkUtil.session(ctx.channel())).append(": ");
            message.append(protocol);
            message.append(downstream ? " > " : " < ");
            message.append(record.getAddress().getHostString());
            message.append("] ");
            message.append(record.getData());
            LOGGER.info(message.toString());
        }
    }
Anton Tananaev8 months ago

Не понял.

Antonio Junior8 months ago

Sorry for sending it in Portuguese, Anton. What I would like to do is add the information about lat, lon, couser, time... to LogsPage.jsx, but I was unsuccessful.

Anton Tananaev8 months ago

If you need help with a customization, we have professional services available. I won't be able to provide anything beyond a general direction here on the forum.

Antonio Junior8 months ago

Thanks!