This action requires elevated privileges.
Elevation code: proc cas; accessControl.assumeRole / adminRole="superuser"; run;
The `log` action allows for viewing and modifying the logging levels of various components within the CAS server. This is crucial for debugging and monitoring server activity. Different loggers can be targeted, and their verbosity can be adjusted from `OFF` to `ALL`. This action can affect the current session, all nodes, and even future sessions, which often requires administrator privileges.
| Parameter | Description |
|---|---|
| level | Specifies the logging level to set. Levels range from `OFF` (no messages) to `ALL` (all messages), including `FATAL`, `ERROR`, `WARN`, `INFO`, `DEBUG`, and `TRACE`. |
| logger | Specifies the name of the logger to modify (e.g., 'App', 'cas.config', 'cas.session'). |
| newSessions | When set to TRUE, the logging change applies to all new sessions initiated on the server. This requires administrator privileges. |
| onMain | When set to TRUE, the logging change is applied to the server controller. This requires administrator privileges. |
This example sets the logging level for the 'App' logger to 'Trace' for the current session. This is useful for getting detailed diagnostic information for a specific application or process.
| 1 | |
| 2 | PROC CAS; |
| 3 | BUILTINS.log logger="App" level="Trace"; |
| 4 | |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
This example demonstrates how an administrator can change the logging level for the 'cas.config' logger to 'Debug' for all future sessions. This is a powerful tool for troubleshooting server-wide configuration issues. This requires administrator privileges.
| 1 | |
| 2 | PROC CAS; |
| 3 | BUILTINS.log logger="cas.config" level="Debug" newSessions=true; |
| 4 | |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |