Skip to content

Have all servers log to files if user desires #123

Open
@1000TurquoisePogs

Description

@1000TurquoisePogs

Currently, zss and app-server log to files in zowe.logDirectory via some scripting:

https://github.com/zowe/zss/blob/b1e08d732ee34f1fda127ebbc799ffab18d6247e/bin/start.sh#L55-L186

It's a lot. But in short, the scripting will determine a filename (component name + timestamp) and then delete the nth oldest such file, to keep a maximum of n in the directory.
Then, tee is used so that content from STDOUT/STDERR will go both into the joblog and a text file.

Users very often send us these text files and no joblog. This is frustrating because servers that dont write to a text file then are missing from the logs.

It would be excellent if we can reproduce this behavior instead entirely within launcher, so all servers can benefit from it.
I've talked to APIML squad about this before and they seemed to want that feature too.

It should be behind a conditional, so that logging is only done when desired, but it could be on by default.

tee has some issues though - it seems to crash if too many bytes are generated at one moment.
So, I suggest this be implemented instead by fileOpen & fileWrite functions by launcher itself.
https://github.com/zowe/zowe-common-c/blob/9e5b1c0cd397acf967489b598e01dec642ffd94c/h/unixfile.h#L406-L412

One could intercept lines to write from the launcher here

launcher/src/main.c

Lines 853 to 857 in 8e5a84c

while (next_line) {
printf("%s\n", next_line);
check_for_and_print_sys_message(next_line);
next_line = strtok(NULL, "\n");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions