Skip to content

Commit

Permalink
Merge pull request #68 from allproxy/v3-50-5
Browse files Browse the repository at this point in the history
Change app name to kind
  • Loading branch information
davechri authored Apr 19, 2024
2 parents b4f3715 + 5d38e1b commit 44189ad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/apFileSystem.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"jsonFields": [],
"method": "advanced",
"jsonLogScript": "// Function called to extract date, level, app name and message\n//\n// @param preJSONString: string - optional non-JSON string proceeding JSON object\n// @param jsonObject: {} - JSON log data\n// @returns {date: Date, level: string, category: string, appName: string, message: string, rawLine: string, additionalJSON: {} }\n//\n// category is the availability zone\n// appName is the pod name\n//\nconst extractDateLevelCategoryAppNameMessage = function (preJSONString, jsonObject) {\n let level = 'info';\n let date = new Date();\n let category = '';\n let appName = 'App_name_is_not_set';\n let message = 'Message is not set - Click \"?\" in upper right to extract fields from JSON';\n // return raw JSON (optional)\n let rawLine;\n // Copy any JSON fields not defined in jsonObject\n let additionalJSON = {};\n\n // Set the level\n // level = jsonObject.m_level;\n\n // Set the date\n //date = jsonObject.my_date;\n\n // Set the app name\n //appName = jsonObject.my_app;\n\n // Set message\n //message = jsonObject.my_message;\n\n return { date, level, category, appName, message, rawLine, additionalJSON };\n}",
"jsonLogScript": "// Function called to extract date, level, app name and message\n//\n// @param preJSONString: string - optional non-JSON string proceeding JSON object\n// @param jsonObject: {} - JSON log data\n// @returns {date: Date, level: string, category: string, appName: string, message: string, rawLine: string, additionalJSON: {} }\n//\n// category is the availability zone\n// appName is the pod name\n//\nconst extractDateLevelCategoryAppNameMessage = function (preJSONString, jsonObject) {\n let level = 'info';\n let date = new Date();\n let category = '';\n let kind = 'kind_is_not_set';\n let message = 'Message is not set - edit or replace client/public/plugins/parsejson/plugin.js';\n // return raw JSON (optional)\n let rawLine;\n // Copy any JSON fields not defined in jsonObject\n let additionalJSON = {};\n\n // Set the level\n // level = jsonObject.m_level;\n\n // Set the date\n // date = jsonObject.my_date;\n\n // Set the kind\n //kind = jsonObject.my_kind;\n\n // Set message\n //message = jsonObject.my_message;\n\n return { date, level, category, kind, message, rawLine, additionalJSON };\n}",
"queries": {},
"briefJsonFields": "{}",
"jsonSubQueries": "[]",
Expand Down
8 changes: 4 additions & 4 deletions jsonLogScript
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const extractDateLevelCategoryAppNameMessage = function (preJSONString, jsonObje
let level = 'info';
let date = new Date();
let category = '';
let appName = 'App_name_is_not_set';
let kind = 'kind_is_not_set';
let message = 'Message is not set - edit or replace client/public/plugins/parsejson/plugin.js';
// return raw JSON (optional)
let rawLine;
Expand All @@ -24,11 +24,11 @@ const extractDateLevelCategoryAppNameMessage = function (preJSONString, jsonObje
// Set the date
// date = jsonObject.my_date;

// Set the app name
//appName = jsonObject.my_app;
// Set the kind
//kind = jsonObject.my_kind;

// Set message
//message = jsonObject.my_message;

return { date, level, category, appName, message, rawLine, additionalJSON };
return { date, level, category, kind, message, rawLine, additionalJSON };
}
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 44189ad

Please sign in to comment.