|
|
Hi Gayan,
What's the requirement behind this? And are you expecting a one time log or the product name for every logline?
-- Best Regards
Rushmin FernandoTechnical Lead
mobile : +94775615183
_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
|
|
I don't see any value in printing product name for every logline. We already printing product name once server started. Please see the example below.
[2018-08-06 09:48:08,391] INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Server : WSO2 Identity Server-5.1.0
Thanks Godwin
On Mon, Aug 6, 2018 at 5:50 AM Rushmin Fernando < [hidden email]> wrote: Hi Gayan,
What's the requirement behind this? And are you expecting a one time log or the product name for every logline?
--
Best Regards
Rushmin FernandoTechnical Lead
mobile : +94775615183
_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
--
_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
|
|
I don't see any value in printing product name for every logline. We already printing product name once server started. Please see the example below.
[2018-08-06 09:48:08,391] INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Server : WSO2 Identity Server-5.1.0
I think there might be situations like identifying log files when we are doing the log file rotation, as those log files won't be having the startup logs, it might be difficult to identify the files if we are not properly handling it.
In that case I think printing product names in the new log file when starting the log file rotation would help.
On Mon, Aug 6, 2018 at 5:50 AM Rushmin Fernando < [hidden email]> wrote: Hi Gayan,
What's the requirement behind this? And are you expecting a one time log or the product name for every logline?
--
Best Regards
Rushmin FernandoTechnical Lead
mobile : +94775615183
_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
--
_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
-- Prakhash Sivakumar
Senior Software Engineer | WSO2 Inc Platform Security Team Mobile : +94771510080
_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
|
|
On Mon, Aug 6, 2018 at 2:22 PM Prakhash Sivakumar < [hidden email]> wrote: I don't see any value in printing product name for every logline. We already printing product name once server started. Please see the example below.
[2018-08-06 09:48:08,391] INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Server : WSO2 Identity Server-5.1.0
I think there might be situations like identifying log files when we are doing the log file rotation, as those log files won't be having the startup logs, it might be difficult to identify the files if we are not properly handling it.
In that case I think printing product names in the new log file when starting the log file rotation would help.
I am not clear how printing productname in each line help for log rotation. Can you explain using an example ?
Thanks Godwin
-- Prakhash Sivakumar
Senior Software Engineer | WSO2 Inc Platform Security Team Mobile : +94771510080
--
_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
|
|
On Mon, Aug 6, 2018 at 2:22 PM Prakhash Sivakumar < [hidden email]> wrote: I don't see any value in printing product name for every logline. We already printing product name once server started. Please see the example below.
[2018-08-06 09:48:08,391] INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Server : WSO2 Identity Server-5.1.0
I think there might be situations like identifying log files when we are doing the log file rotation, as those log files won't be having the startup logs, it might be difficult to identify the files if we are not properly handling it.
In that case I think printing product names in the new log file when starting the log file rotation would help.
I am not clear how printing productname in each line help for log rotation. Can you explain using an example ?
What I was suggesting is printing the product name when creating a new file every time during the rotation. It will appear only once in the log file.(not in each line)
I think Gayan's requirement also should be something similar. @Gayan can you please elaborate if you have any other requirements
Thanks.
Thanks Godwin
-- Prakhash Sivakumar
Senior Software Engineer | WSO2 Inc Platform Security Team Mobile : +94771510080
--
-- Prakhash Sivakumar
Senior Software Engineer | WSO2 Inc Platform Security Team Mobile : +94771510080
_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
|
|
On Mon, Aug 6, 2018 at 4:42 PM Prakhash Sivakumar < [hidden email]> wrote: On Mon, Aug 6, 2018 at 2:22 PM Prakhash Sivakumar < [hidden email]> wrote: I don't see any value in printing product name for every logline. We already printing product name once server started. Please see the example below.
[2018-08-06 09:48:08,391] INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Server : WSO2 Identity Server-5.1.0
I think there might be situations like identifying log files when we are doing the log file rotation, as those log files won't be having the startup logs, it might be difficult to identify the files if we are not properly handling it.
In that case I think printing product names in the new log file when starting the log file rotation would help.
I am not clear how printing productname in each line help for log rotation. Can you explain using an example ?
What I was suggesting is printing the product name when creating a new file every time during the rotation. It will appear only once in the log file.(not in each line)
Ok, I understand wht you are telling now, once log rotated, we cannot have any log entry identify product name.
I think Gayan's requirement also should be something similar. @Gayan can you please elaborate if you have any other requirements
Yes. Can you explain what you are trying to acheive here ?
Thanks Godwin
Thanks.
Thanks Godwin
-- Prakhash Sivakumar
Senior Software Engineer | WSO2 Inc Platform Security Team Mobile : +94771510080
--
-- Prakhash Sivakumar
Senior Software Engineer | WSO2 Inc Platform Security Team Mobile : +94771510080
--
_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
|
|
Thanks All,
I need something like below to print product name with each line of log so that It would be easy to separate logs by product in logstash.
TID: [-1] [ESB] [2018-07-12 15:38:22,463] DEBUG {org.wso2.carbon.mediation.ntask.internal.NtaskService} - Un-setting the Realm Service. {org.wso2.carbon.mediation.ntask.internal.NtaskService}
_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
|
|
Hi Gayan,
I think the best way is to do it from the logstash level if possible (filtering etc .. )
If you really need the product name in each log line, you can simply modify the log appender in log4j.porperties.
log4j.appender.CARBON_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon${instance.log}.log log4j.appender.CARBON_LOGFILE.Append=true log4j.appender.CARBON_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout # ConversionPattern will be overridden by the configuration setting in the DB log4j.appender.CARBON_LOGFILE.layout.ConversionPattern=[WSO2-IS] TID: [%T] [%S] [%d] %P%5p {%c} - %x %m %n
On Tue, Aug 7, 2018 at 6:44 PM gayan gunawardana < [hidden email]> wrote: Thanks All,
I need something like below to print product name with each line of log so that It would be easy to separate logs by product in logstash.
TID: [-1] [ESB] [2018-07-12 15:38:22,463] DEBUG {org.wso2.carbon.mediation.ntask.internal.NtaskService} - Un-setting the Realm Service. {org.wso2.carbon.mediation.ntask.internal.NtaskService}
-- Best Regards
Rushmin FernandoTechnical Lead
mobile : +94775615183
_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
|
|