Hey Guys,
I have a problem with the node-red-contrib-advance-logger. I tried to log the output in 10 files of size 1 MB each but the output just gets logged only into one file. The log type I am logging is "info".
Thanks,
raghu
Hey Guys,
I have a problem with the node-red-contrib-advance-logger. I tried to log the output in 10 files of size 1 MB each but the output just gets logged only into one file. The log type I am logging is "info".
Thanks,
raghu
That node hasn't been updated in 7 years and appears to be abandoned. You might want to try
node-red-contrib-advanced-logger
(node the d
at the end of 'advanced') which is a fork of `node-red-contrib-advance-logger'
hello @zenofmud
Thanks for the reply. I tried using the advanced logger but my problem is to store the logs for a definite period and then rewrite them. Also if possible I want to store them in different files.
Can you please help me find a solution to this.
In addition, I want to ask if there is any way to parse the output and rearrange the data of these log files.For example the time stamp is present at the end of the json text and I want to move it to the front
I was going to suggest you open an issue on the node's GitHub page and see if the author would help you out, but I see that 'issues' are not activated on that node.
What have you tried so far?
Have you a test flow showing the issue? If so, please attach it to a reply.
In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```
)
```
code goes here
```
You can edit and correct your post by clicking the pencil icon.
See this post for more details - How to share code or flow json
I tried creating a dummy flow with inject nodes and a cpu profiler. My focus is only the logger outputs.I tried to see whether the outputs are logged in 10 different files or are overwritten
I am attaching the code below.
[
{
"id": "12f802aa7fe70b77",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "72c11c4cc910874f",
"type": "cpu",
"z": "12f802aa7fe70b77",
"name": "",
"msgCore": false,
"msgOverall": false,
"msgArray": true,
"msgTemp": false,
"x": 1050,
"y": 360,
"wires": [
[
"8dff7eea27eca8ac",
"13f44e646b8bef90",
"f81d660744e2f780"
]
]
},
{
"id": "1e64aac6b5b88d1a",
"type": "inject",
"z": "12f802aa7fe70b77",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 670,
"y": 360,
"wires": [
[
"72c11c4cc910874f"
]
]
},
{
"id": "13f44e646b8bef90",
"type": "logger",
"z": "12f802aa7fe70b77",
"d": true,
"name": "cpu1.log",
"filename": "cpu2.log,cpu3.log,cpu4.log",
"maxsize": "1",
"maxfiles": 10,
"complete": "true",
"console": false,
"file": true,
"debug": true,
"zip": true,
"logtype": "info",
"x": 1640,
"y": 400,
"wires": []
},
{
"id": "8dff7eea27eca8ac",
"type": "ui_chart",
"z": "12f802aa7fe70b77",
"name": "",
"group": "8c356fa78dca6fea",
"order": 0,
"width": "6",
"height": "9",
"label": "chart",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "",
"ymax": "",
"removeOlder": 1,
"removeOlderPoints": "",
"removeOlderUnit": "3600",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 1030,
"y": 460,
"wires": [
[]
]
},
{
"id": "1d8f127500a93580",
"type": "inject",
"z": "12f802aa7fe70b77",
"name": "inject payload 1",
"props": [
{
"p": "payload"
}
],
"repeat": "0.1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"_msgid\":\"12345\",\"payload\":\"KpJnQEm3qKTn5L8v7yqA6DdcfvrZvkJFRS4zRO2Xm3fwX2VeezrKDicZpD5kpv65GmnnOn6kHeXVb4QkRaGK4NUMfJmhGSfY0KEh5nGOGnbF9RkCk9fVqSJXFMVffLVMQxgHZLtfwzpjlnGZy5ZJS1XhAaOexRRjFRVYf46YMytIxUDx1jNfHUyHZuOGBZFEKkGnds1ohzIv61JgVrmfhbVZvho0UhPp00bBlJ4487yMvHo0Hpz3tGcHj1Xa3YNLxYyStg4XaBLpWP4Qpi84C47ZLGnTNi6aqxsc0rBjDEefJmM8ZmupA86EAQVpqdgZKuADPosLFTRBI13L12fOpDJVUf5aGeJ5iDwlvTj8jNfC85nfJ2utrbXMAi8AD6TPiPkVwDNo0O18pwNAR7PLGuvKOoBDDiGjCIvYSclWgQjuRdmUe4qOKfIlNeYoHgV45ERyIn8y3tcdWr3uvCk248TAepoqIF9L6tICoeBnzNNm1JTooQpnUjLAUTx56kPeUuon1dG1FNBLqtgkTPLadzni1VQ4YdsGfPVTg60qkVwnnsh9AaXS8z26MULlKV1jiMTw4oSQU0afGDx9OQoBBXVzu0qzoXcYDYPSJRzcfsizE4moZzSHjZtmTVzWJZqXx0zIcbwGZJIOQm1sYqg7rfGzPk58RQiuN0NlvO1SpjhKbdisdbBQfG6FpAC3qBnqEGqn0GYt91pHabKDpWCmtVmdUqSvyA21BS37AfQ2B24ZG8xHhxGWFtsh4Rw20IeOyRzDzagP3qMssXqWTEbZr2DyYvg7GUPewG20YuX0he1rHmHsXhvrw0RPyP330yBjIpizNPQeHw1vbrbQ4tFeGIXzVtyk5v9pufEb6bNNZYDxNZEvWVxEDBi5tqeLC3ULFC5sAlGx5iqPImLhvwBot4ZCNCAg6mkiy2AIMW1L0J1Q5awpdk6Ct92lzyFdSEC2URjZlimetCozK5RJhuxIrDIKcOyDxMTKEBswK8zy\"}",
"payloadType": "json",
"x": 1210,
"y": 240,
"wires": [
[
"13f44e646b8bef90",
"7780b8b347fb6c1f",
"f81d660744e2f780"
]
]
},
{
"id": "7780b8b347fb6c1f",
"type": "debug",
"z": "12f802aa7fe70b77",
"name": "debug 67891",
"active": true,
"tosidebar": true,
"console": true,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1680,
"y": 220,
"wires": []
},
{
"id": "19ee3ef1604bc028",
"type": "debug",
"z": "12f802aa7fe70b77",
"name": "debug 67892",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1570,
"y": 560,
"wires": []
},
{
"id": "e1e483c28c704b22",
"type": "inject",
"z": "12f802aa7fe70b77",
"name": "inject payload 2",
"props": [
{
"p": "payload"
}
],
"repeat": "0.1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"_msgid\":\"67890\",\"payload\":\"IX4v2Whccd6WCq5niAWug5tnLCCXkmspZV85bxHVqQ21gj964cBi7UvGaHSfsTzeqZ1VOvY4aJr0FidvTgrDQE6frgvvaGAHWy8wev2muBiUCt9aEbFQFcao2MWJgo86YQVwA3ZaSiK4jk778UJd23ZyODI181Qh85l7atybFxJPgXs00SjV5CzoJSA8PWHLk5DsObT7J3X66QqMsrQnrZloXFU0EzwMdJr6HYOBIfkVxx9aqKoGzKNm1y8EsqDOMd2l0soVScsLl0IQT1PuPHdZ1VnnLy5SbTCMUz4wHBYWEULDcDv4dgVmeXXGSUZ2ajUHA6jHjoY5Mfqp0qGaJgZmaVryr4P8hH49mxR7yL2cguPAwp3gG6pmzb3hDw3ec0zF0SeXZZLB5M97wSFmALXJrOljaT28lklbzoz9CeuErDzVTTLj7O8FI31CdxyZqgRlyMIkEknclQESxl3sTmCUxzDJ61IH8nIlGlql3tLj8XWIHvgfNuHgIK2N40QbXxZ5KgdjnMcnTC4e1Bz1rQOUML6qapxTHs8QgD6VZtEzx92RpFFVBl5up0EY5KuJBJ9jhQ4bSGaWInD3Fb6lCRb0DJsAkuUiCHGgoaQZA2y2L6Ra4tM6JAuK2JMUKQCrUicv4Cv5EDYgtuw3W93hcLVzYnI0WwGSMeaLmxBPpxB0WrpAtBJk7KsFiQtLpj5dEcljhfwTGPqnTkH4PqCjpqsIKrPN9h3zlUvTzKEDG3jDVtwxYJygR9awHi4Zvotdq73HmtbGx3PtwibVuouxZ4y64rDgadhf2PDGc4xW6Ug4V6fGkLun1lYJ71c2Vf7wsG13o8WQnW9zgIcnXxfLhoCKlxRxe4R9M0OPOtkMVWwCD7XDr6eTzcJWATc5ortIvOJbEwJIefBBmTl43SDsAqsEX90eM1BFSFxwYS8DcsuAHZhrBsKG0OgfRAtJh0t2LBJixStEChUK6XomfQmH6h1FPoVDuIxyeq7hXio2\"}",
"payloadType": "json",
"x": 1130,
"y": 580,
"wires": [
[
"13f44e646b8bef90",
"19ee3ef1604bc028",
"f81d660744e2f780"
]
]
},
{
"id": "06460a11c24e022c",
"type": "debug",
"z": "12f802aa7fe70b77",
"name": "debug 67893",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1570,
"y": 640,
"wires": []
},
{
"id": "e52b06d81236a329",
"type": "inject",
"z": "12f802aa7fe70b77",
"name": "inject payload 3",
"props": [
{
"p": "payload"
}
],
"repeat": "0.1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"_msgid\":\"18465\",\"payload\":\"IX4v2Whccd6WCq5niAWug5tnLCCXkmspZV85bxHVqQ21gj964cBi7UvGaHSfsTzeqZ1VOvY4aJr0FidvTgrDQE6frgvvaGAHWy8wev2muBiUCt9aEbFQFcao2MWJgo86YQVwA3ZaSiK4jk778UJd23ZyODI181Qh85l7atybFxJPgXs00SjV5CzoJSA8PWHLk5DsObT7J3X66QqMsrQnrZloXFU0EzwMdJr6HYOBIfkVxx9aqKoGzKNm1y8EsqDOMd2l0soVScsLl0IQT1PuPHdZ1VnnLy5SbTCMUz4wHBYWEULDcDv4dgVmeXXGSUZ2ajUHA6jHjoY5Mfqp0qGaJgZmaVryr4P8hH49mxR7yL2cguPAwp3gG6pmzb3hDw3ec0zF0SeXZZLB5M97wSFmALXJrOljaT28lklbzoz9CeuErDzVTTLj7O8FI31CdxyZqgRlyMIkEknclQESxl3sTmCUxzDJ61IH8nIlGlql3tLj8XWIHvgfNuHgIK2N40QbXxZ5KgdjnMcnTC4e1Bz1rQOUML6qapxTHs8QgD6VZtEzx92RpFFVBl5up0EY5KuJBJ9jhQ4bSGaWInD3Fb6lCRb0DJsAkuUiCHGgoaQZA2y2L6Ra4tM6JAuK2JMUKQCrUicv4Cv5EDYgtuw3W93hcLVzYnI0WwGSMeaLmxBPpxB0WrpAtBJk7KsFiQtLpj5dEcljhfwTGPqnTkH4PqCjpqsIKrPN9h3zlUvTzKEDG3jDVtwxYJygR9awHi4Zvotdq73HmtbGx3PtwibVuouxZ4y64rDgadhf2PDGc4xW6Ug4V6fGkLun1lYJ71c2Vf7wsG13o8WQnW9zgIcnXxfLhoCKlxRxe4R9M0OPOtkMVWwCD7XDr6eTzcJWATc5ortIvOJbEwJIefBBmTl43SDsAqsEX90eM1BFSFxwYS8DcsuAHZhrBsKG0OgfRAtJh0t2LBJixStEChUK6XomfQmH6h1FPoVDuIxyeq7hXio2\"}",
"payloadType": "json",
"x": 1130,
"y": 640,
"wires": [
[
"06460a11c24e022c",
"13f44e646b8bef90",
"f81d660744e2f780"
]
]
},
{
"id": "5dafc7dcd4b612d8",
"type": "debug",
"z": "12f802aa7fe70b77",
"name": "debug 67894",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1550,
"y": 700,
"wires": []
},
{
"id": "c7398e0e05d83893",
"type": "inject",
"z": "12f802aa7fe70b77",
"name": "inject payload 4",
"props": [
{
"p": "payload"
}
],
"repeat": "0.1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"_msgid\":\"155690\",\"payload\":\"IX4v2Whccd6WCq5niAWug5tnLCCXkmspZV85bxHVqQ21gj964cBi7UvGaHSfsTzeqZ1VOvY4aJr0FidvTgrDQE6frgvvaGAHWy8wev2muBiUCt9aEbFQFcao2MWJgo86YQVwA3ZaSiK4jk778UJd23ZyODI181Qh85l7atybFxJPgXs00SjV5CzoJSA8PWHLk5DsObT7J3X66QqMsrQnrZloXFU0EzwMdJr6HYOBIfkVxx9aqKoGzKNm1y8EsqDOMd2l0soVScsLl0IQT1PuPHdZ1VnnLy5SbTCMUz4wHBYWEULDcDv4dgVmeXXGSUZ2ajUHA6jHjoY5Mfqp0qGaJgZmaVryr4P8hH49mxR7yL2cguPAwp3gG6pmzb3hDw3ec0zF0SeXZZLB5M97wSFmALXJrOljaT28lklbzoz9CeuErDzVTTLj7O8FI31CdxyZqgRlyMIkEknclQESxl3sTmCUxzDJ61IH8nIlGlql3tLj8XWIHvgfNuHgIK2N40QbXxZ5KgdjnMcnTC4e1Bz1rQOUML6qapxTHs8QgD6VZtEzx92RpFFVBl5up0EY5KuJBJ9jhQ4bSGaWInD3Fb6lCRb0DJsAkuUiCHGgoaQZA2y2L6Ra4tM6JAuK2JMUKQCrUicv4Cv5EDYgtuw3W93hcLVzYnI0WwGSMeaLmxBPpxB0WrpAtBJk7KsFiQtLpj5dEcljhfwTGPqnTkH4PqCjpqsIKrPN9h3zlUvTzKEDG3jDVtwxYJygR9awHi4Zvotdq73HmtbGx3PtwibVuouxZ4y64rDgadhf2PDGc4xW6Ug4V6fGkLun1lYJ71c2Vf7wsG13o8WQnW9zgIcnXxfLhoCKlxRxe4R9M0OPOtkMVWwCD7XDr6eTzcJWATc5ortIvOJbEwJIefBBmTl43SDsAqsEX90eM1BFSFxwYS8DcsuAHZhrBsKG0OgfRAtJh0t2LBJixStEChUK6XomfQmH6h1FPoVDuIxyeq7hXio2\"}",
"payloadType": "json",
"x": 1130,
"y": 700,
"wires": [
[
"5dafc7dcd4b612d8",
"13f44e646b8bef90",
"f81d660744e2f780"
]
]
},
{
"id": "95b6d09784c90801",
"type": "debug",
"z": "12f802aa7fe70b77",
"name": "debug 67895",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1650,
"y": 820,
"wires": []
},
{
"id": "c315fb60679eab5b",
"type": "inject",
"z": "12f802aa7fe70b77",
"name": "inject payload 6",
"props": [
{
"p": "payload"
}
],
"repeat": "0.1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"_msgid\":\"63327\",\"payload\":\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]
},
{
"id": "f7699d1d71a0062c",
"type": "debug",
"z": "12f802aa7fe70b77",
"name": "debug 67896",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1610,
"y": 760,
"wires": []
},
{
"id": "402c0486030035d2",
"type": "inject",
"z": "12f802aa7fe70b77",
"name": "inject payload 5",
"props": [
{
"p": "payload"
}
],
"repeat": "0.1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"_msgid\":\"78890\",\"payload\":\"IX4v2Whccd6WCq5niAWug5tnLCCXkmspZV85bxHVqQ21gj964cBi7UvGaHSfsTzeqZ1VOvY4aJr0FidvTgrDQE6frgvvaGAHWy8wev2muBiUCt9aEbFQFcao2MWJgo86YQVwA3ZaSiK4jk778UJd23ZyODI181Qh85l7atybFxJPgXs00SjV5CzoJSA8PWHLk5DsObT7J3X66QqMsrQnrZloXFU0EzwMdJr6HYOBIfkVxx9aqKoGzKNm1y8EsqDOMd2l0soVScsLl0IQT1PuPHdZ1VnnLy5SbTCMUz4wHBYWEULDcDv4dgVmeXXGSUZ2ajUHA6jHjoY5Mfqp0qGaJgZmaVryr4P8hH49mxR7yL2cguPAwp3gG6pmzb3hDw3ec0zF0SeXZZLB5M97wSFmALXJrOljaT28lklbzoz9CeuErDzVTTLj7O8FI31CdxyZqgRlyMIkEknclQESxl3sTmCUxzDJ61IH8nIlGlql3tLj8XWIHvgfNuHgIK2N40QbXxZ5KgdjnMcnTC4e1Bz1rQOUML6qapxTHs8QgD6VZtEzx92RpFFVBl5up0EY5KuJBJ9jhQ4bSGaWInD3Fb6lCRb0DJsAkuUiCHGgoaQZA2y2L6Ra4tM6JAuK2JMUKQCrUicv4Cv5EDYgtuw3W93hcLVzYnI0WwGSMeaLmxBPpxB0WrpAtBJk7KsFiQtLpj5dEcljhfwTGPqnTkH4PqCjpqsIKrPN9h3zlUvTzKEDG3jDVtwxYJygR9awHi4Zvotdq73HmtbGx3PtwibVuouxZ4y64rDgadhf2PDGc4xW6Ug4V6fGkLun1lYJ71c2Vf7wsG13o8WQnW9zgIcnXxfLhoCKlxRxe4R9M0OPOtkMVWwCD7XDr6eTzcJWATc5ortIvOJbEwJIefBBmTl43SDsAqsEX90eM1BFSFxwYS8DcsuAHZhrBsKG0OgfRAtJh0t2LBJixStEChUK6XomfQmH6h1FPoVDuIxyeq7hXio2\"}",
"payloadType": "json",
"x": 1130,
"y": 760,
"wires": [
[
"f7699d1d71a0062c",
"13f44e646b8bef90",
"f81d660744e2f780"
]
]
},
{
"id": "f81d660744e2f780",
"type": "advanced logger",
"z": "12f802aa7fe70b77",
"d": true,
"name": "",
"filename": "node-red.log",
"complete": "true",
"console": false,
"file": false,
"debug": false,
"zip": false,
"logtype": "info",
"prefix": "./AdvancedLogger/%DATE%.log",
"datePattern": "DD-MM-YYYY",
"x": 1580,
"y": 300,
"wires": []
},
{
"id": "8c356fa78dca6fea",
"type": "ui_group",
"name": "Group 1",
"tab": "206eb3d521eb84fe",
"order": 1,
"disp": true,
"width": 6
},
{
"id": "206eb3d521eb84fe",
"type": "ui_tab",
"name": "Tab 1",
"icon": "dashboard",
"order": 1
}
]
Here are two more loggers you might want to try:
node-red-contrib-flogger-coco
@autexis/node-red-payload-logger
maybe one of them will work for you.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.