What I ran into
I was trying to troubleshoot a Change Selector issue on IBM i and realized I did not have a clear mental model of where to look for logs or how they behave. Once I dug into it, the logging setup actually explains a lot about how CDC runs on IBM i.
Where the Change Selector logs live
Every Change Selector writes to a log file in the metabase library:
- File name: CSnLOG
- “n” = server number assigned in Director
You can find that server number in the Change Selector properties under the Basic tab. That number uniquely identifies each selector in your model.
How log rotation works (older versions)
In older versions (V4.07P1 and earlier):
- CSnLOG has 3 members: LOG1, LOG2, LOG3
- Logs rotate in sequence:
- LOG1 → LOG2
- LOG2 → LOG3
- LOG3 → back to LOG1
So the logs are constantly overwritten in a cycle.
How log rotation works (newer versions)
In newer versions (V4.08 and above):
- Up to 10 log members: LOG0 to LOG9
- LOG0 is always the active log
- Rotation happens based on size and time (usually daily)
- Older logs shift up when rotation happens
This makes log management much easier compared to the older cycle.
What gets logged
Logging level is configurable from Director in the Change Selector properties.
You can choose:
- Errors only
- Warnings and errors
- More detailed tracing
For normal use, I avoid setting it below Warnings. Errors alone can miss useful context.
What helped me in troubleshooting
A couple of things made a big difference:
- Knowing the exact CSnLOG file based on server ID
- Checking which log member is active
- Increasing log level temporarily when debugging
Once I knew where to look, issues that felt “invisible” became much easier to trace.
What changed for me
I used to think Change Selector logging was scattered or hard to follow.
It is actually very structured:
- One file per selector
- Rotating members
- Controlled logging level
Once I aligned with that structure, finding issues became much faster.
Takeaway
If you are debugging IBM i capture:
- Start with CSnLOG in the metabase
- Check the correct server number
- Understand which log member is active
That alone can save a lot of time.
Have you ever struggled to find the right Change Selector log, or spotted something interesting in CSnLOG during debugging?