Skip to content

Script log entries with unrecognized statuses ignore the log threshold #282

Description

@pheus

Plugin Version

v0.2.0

NetBox Version

v4.7.6

Python Version

3.12

Steps to Reproduce

  1. Upload and activate a Project containing the following Script File, legacy_log.py:
    from django.utils import timezone
    from netbox_scripts import Script
    
    
    class LegacyLog(Script):
        def run(self, data, commit):
            self.messages.append({
                'time': timezone.now().isoformat(),
                'status': 'default',
                'message': 'A legacy log entry',
                'obj': None,
                'url': None,
            })
            self.log_info('An info entry')
            self.log_warning('A warning entry')
  2. Run the Script from its Run tab.
  3. On the result page, select Warning as the log threshold.

Expected Behavior

Log entries with an unrecognized status are treated as Info entries when applying the log threshold and are therefore hidden at higher thresholds.

Observed Behavior

The legacy log entry remains visible regardless of the selected log threshold.

This also affects runcustomscript --loglevel warning and migrated Script execution history containing the legacy default status used by older NetBox versions.

Activity

  1. added theissue type on Dec 2, 2026
  2. added
    status: needs triage
    type: bug
    app: scripts
    severity: low
    status: backlog
    and removed
    status: needs triage
    on Dec 2, 2026
  3. added this to the v0.3.0 milestone on Dec 2, 2026
  4. self-assigned this
    on Dec 3, 2026
  5. added
    status: accepted
    and removed
    status: backlog
    on Dec 3, 2026
  6. added 2 commits that reference this issue on Dec 3, 2026
    2b789e3
    ad28174
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Bucket: KTLOapp: scriptsseverity: lowstatus: acceptedtype: bug

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions