SuggestedStructuredLogNumberAssignments.md #1

  • //
  • p4-sdp/
  • dev/
  • doc/
  • SuggestedStructuredLogNumberAssignments.md
  • Markdown
  • View
  • Commits
  • Open Download .zip Download (3 KB)

Suggested Structured Log Number Assignments

Disclaimer

The numeric suffix in serverlog.file.N has no functional relationship to the structured log type. P4 Server does not require a particular number for any structured log type.

The assignments below are optional conventions intended only to:

  • Reduce the chance of configuration collisions.
  • Make structured log configuration easier to read and review.
  • Avoid repeatedly choosing and checking numbers when adding logs.
  • Preserve established SDP and Perforce training examples where practical.

Existing site conventions do not need to be changed merely to match this list.

The log names below intentionally omit filename extensions. The configured filename must use a format supported by the applicable P4 Server release.

Suggested Assignments

Number Log Type Comments
1 all Reserved for testing and diagnostics. Generally avoid in production due to log volume.
2 commands
3 errors SDP Default
4 audit
5 track
6 user
7 events SDP Default
8 integrity SDP Default
9 auth
10 route
11 triggers SDP Default
20 ldapsync
21 action Suggested extended-log assignment.
22 auditsize Suggested assignment for legacy/deprecated log type.

Example Configuration

These are SDP default values:

p4 configure set serverlog.file.3=$LOGS/errors.csv
p4 configure set serverlog.file.7=$LOGS/events.csv
p4 configure set serverlog.file.8=$LOGS/integrity.csv
p4 configure set serverlog.file.11=$LOGS/triggers.csv

Associated settings such as serverlog.maxmb.N, serverlog.retain.N, serverlog.events.N, and serverlog.version.N refer to the log with the same number.

Alternate Suffixes

Only the .csv format is documented and fully supported. Additional suffixes may work depending on the p4d version, but are not officially supported. Examples include:

Suffix Comments
.csv Default Comma separated value (CSV) format. Supported.
.json JSON format. Undocumented.
.xml XML format. Undocumented.
.txt Text Key/Value Pair format. Undocumented.
.xyz Any unknown/unhandled suffix, e.g. log, gets CSV format.

Rationale

This numbering convention aligns with established SDP defaults and compatible assignments from Perforce training materials. The lower-numbered range groups the original and commonly used structured log types, while the gap between 11 and 20 leaves room for future additions without disturbing existing assignments. Less common or newer log types begin at 20 so they remain easy to distinguish. The convention is intended solely to improve consistency, readability, and collision avoidance; the numbers have no functional meaning to P4 Server.

# Suggested Structured Log Number Assignments

## Disclaimer

The numeric suffix in `serverlog.file.N` has no functional relationship to the structured log type. P4 Server does not require a particular number for any structured log type.

The assignments below are optional conventions intended only to:

- Reduce the chance of configuration collisions.
- Make structured log configuration easier to read and review.
- Avoid repeatedly choosing and checking numbers when adding logs.
- Preserve established SDP and Perforce training examples where practical.

Existing site conventions do not need to be changed merely to match this list.

The log names below intentionally omit filename extensions. The configured filename must use a format supported by the applicable P4 Server release.

## Suggested Assignments

| Number | Log Type | Comments |
|------:|----------|----------|
| 1 | `all` | Reserved for testing and diagnostics. Generally avoid in production due to log volume. |
| 2 | `commands` | |
| 3 | `errors` | SDP Default |
| 4 | `audit` | |
| 5 | `track` | |
| 6 | `user` | |
| 7 | `events` | SDP Default |
| 8 | `integrity` | SDP Default |
| 9 | `auth` | |
| 10 | `route` | |
| 11 | `triggers` | SDP Default |
| 20 | `ldapsync` | |
| 21 | `action` | Suggested extended-log assignment. |
| 22 | `auditsize` | Suggested assignment for legacy/deprecated log type. |

## Example Configuration

These are SDP default values:

```bash
p4 configure set serverlog.file.3=$LOGS/errors.csv
p4 configure set serverlog.file.7=$LOGS/events.csv
p4 configure set serverlog.file.8=$LOGS/integrity.csv
p4 configure set serverlog.file.11=$LOGS/triggers.csv
```

Associated settings such as `serverlog.maxmb.N`, `serverlog.retain.N`, `serverlog.events.N`, and `serverlog.version.N` refer to the log with the same number.

## Alternate Suffixes

Only the `.csv` format is documented and fully supported.  Additional suffixes may work depending on the p4d version, but are not officially supported.  Examples include:

| Suffix | Comments |
|------:|----------|
| `.csv`  | Default Comma separated value (CSV) format. Supported. |
| `.json` | JSON format. Undocumented. |
| `.xml`  | XML format. Undocumented. |
| `.txt`  | Text Key/Value Pair format. Undocumented. |
| `.xyz`    | Any unknown/unhandled suffix, e.g. `log`, gets CSV format. |

## Rationale

This numbering convention aligns with established SDP defaults and compatible assignments from Perforce training materials. The lower-numbered range groups the original and commonly used structured log types, while the gap between 11 and 20 leaves room for future additions without disturbing existing assignments. Less common or newer log types begin at 20 so they remain easy to distinguish. The convention is intended solely to improve consistency, readability, and collision avoidance; the numbers have no functional meaning to P4 Server.
# Change User Description Committed
#1 33837 C. Thomas Tyler Added a document with suggested structured log number assginments.

#review-33838 @jclucas @mark_zinthefer @robert_cowham @tom_tyler