Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have all servers log to files if user desires #123

Open
1000TurquoisePogs opened this issue Jul 8, 2024 · 0 comments
Open

Have all servers log to files if user desires #123

1000TurquoisePogs opened this issue Jul 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@1000TurquoisePogs
Copy link
Member

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");
}

@jp669844 jp669844 added the enhancement New feature or request label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants