sassoftware / sassoftware/python-swat

Redirect swat log to custom logger

Open
#88 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
159
Forks
65
PR merge metrics
No merged PRs in 30d

Description

I have a custom logger (from standard logging module) in my code. I would like that all the swat outputs like:

[table.partition]
   table.name = "XXX" (string)
   casout.name    = "YYY" (string)
   casout.replace = true (boolean)
NOTE: Executing action 'table.partition'.
NOTE: Action 'table.partition' used (Total process time):
NOTE:       real time               0,078051 seconds
NOTE:       cpu time                0,268939 seconds (344,57%)
NOTE:       data movement time      0,001960 seconds
NOTE:       total nodes             7 (672 cores)
NOTE:       total memory            5,11T
NOTE:       memory                  639,94M (0,01%)
NOTE:       bytes moved             140,18K

are not printed in the console, but instead logged using my logger (which can still write to the console, or to a file, or whatever).

Is that possible?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing where SWAT emits CAS action output such as the table.partition messages, then inspect how a standard Python logging.Logger could be supplied or configured. Done means these messages no longer print directly when a custom logger is used, while the logger still controls whether output goes to the console, a file, or another destination.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.