Menu

#121 Import error in new logstash script

v7.12
closed
nobody
None
5
2025-07-22
2025-06-10
No

After pulling in the recent 2025-06-03 updates I get this import error on the logstash script:

vm-test-run-logwatch-module-test>  "format" is not defined in %Logwatch::EXPORT_TAGS at /nix/store/zkr8b9vbmjf4jgzrv2fc0af3wpcwmj06-logwatch-unstable-2025-06-03/usr/share/logwatch/scripts/services/logstash line 17.
vm-test-run-logwatch-module-test>       main::BEGIN() called at /nix/store/zkr8b9vbmjf4jgzrv2fc0af3wpcwmj06-logwatch-unstable-2025-06-03/usr/share/logwatch/scripts/services/logstash line 17
vm-test-run-logwatch-module-test>       eval {...} called at /nix/store/zkr8b9vbmjf4jgzrv2fc0af3wpcwmj06-logwatch-unstable-2025-06-03/usr/share/logwatch/scripts/services/logstash line 17
vm-test-run-logwatch-module-test>  Can't continue after import errors at /nix/store/zkr8b9vbmjf4jgzrv2fc0af3wpcwmj06-logwatch-unstable-2025-06-03/usr/share/logwatch/scripts/services/logstash line 17.
vm-test-run-logwatch-module-test>  BEGIN failed--compilation aborted at /nix/store/zkr8b9vbmjf4jgzrv2fc0af3wpcwmj06-logwatch-unstable-2025-06-03/usr/share/logwatch/scripts/services/logstash line 17.
vm-test-run-logwatch-module-test>

The scripts also contains calls to FormatHashCounts which I dont' see anywhere in the repo. Does the library module need an update or something?

Related

Bugs: #121

Discussion

  • Mike Tremaine

    Mike Tremaine - 2025-06-10

    There is no :format defined in Logwatch.pm

    There is only

    =item I<:sort>

    Imports C<countorder>, C<TotalCountOrder and C<sortip></sortip></countorder>

    =item I<:ip>

    Imports C<dolookup>, C<lookupip>, and C<sortip></sortip></lookupip></dolookup>

    =item I<:dates>

    Imports C<rangehelpdm getperiod="" timebuild="" timefilter=""></rangehelpdm>

    =item I<:all>

    Imports all importable symbols.

    =cut

    I would comment out the :format and try running it.

    On Jun 10, 2025, at 8:52 AM, Stefan Frijters sfrijters@users.sourceforge.net wrote:

    [bugs:#121] https://sourceforge.net/p/logwatch/bugs/121/ Import error in new logstash script

    Status: open
    Group: v7.12
    Created: Tue Jun 10, 2025 03:52 PM UTC by Stefan Frijters
    Last Updated: Tue Jun 10, 2025 03:52 PM UTC
    Owner: nobody

    After pulling in the recent 2025-06-03 updates I get this import error on the logstash script:

    vm-test-run-logwatch-module-test> "format" is not defined in %Logwatch::EXPORT_TAGS at /nix/store/zkr8b9vbmjf4jgzrv2fc0af3wpcwmj06-logwatch-unstable-2025-06-03/usr/share/logwatch/scripts/services/logstash line 17.
    vm-test-run-logwatch-module-test> main::BEGIN() called at /nix/store/zkr8b9vbmjf4jgzrv2fc0af3wpcwmj06-logwatch-unstable-2025-06-03/usr/share/logwatch/scripts/services/logstash line 17
    vm-test-run-logwatch-module-test> eval {...} called at /nix/store/zkr8b9vbmjf4jgzrv2fc0af3wpcwmj06-logwatch-unstable-2025-06-03/usr/share/logwatch/scripts/services/logstash line 17
    vm-test-run-logwatch-module-test> Can't continue after import errors at /nix/store/zkr8b9vbmjf4jgzrv2fc0af3wpcwmj06-logwatch-unstable-2025-06-03/usr/share/logwatch/scripts/services/logstash line 17.
    vm-test-run-logwatch-module-test> BEGIN failed--compilation aborted at /nix/store/zkr8b9vbmjf4jgzrv2fc0af3wpcwmj06-logwatch-unstable-2025-06-03/usr/share/logwatch/scripts/services/logstash line 17.
    vm-test-run-logwatch-module-test>
    The scripts also contains calls to FormatHashCounts which I dont' see anywhere in the repo. Does the library module need an update or something?

    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/logwatch/bugs/121/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #121

  • Stefan Frijters

    Stefan Frijters - 2025-06-10

    As kind of expected, removing that line triggers

    Undefined subroutine &main::FormatHashCounts called at /nix/store/nggvyi2kh2sbfjc9g0iar7ykf8njszvs-logwatch-unstable-2025-06-03/usr/share/logwatch/scripts/services/logstash line 80.
    

    which is why I assumed that something has not been added/committed to logwatch.pm to make this work.

     
  • Orion Poplawski

    Orion Poplawski - 2025-06-23

    My apologies, I committed that script too soon. It should just be removed completely, which I have done in master.

     
  • Stefan Frijters

    Stefan Frijters - 2025-06-23

    Cheers, I will update.

     
  • Bjorn

    Bjorn - 2025-07-22
    • status: open --> closed
     
  • Bjorn

    Bjorn - 2025-07-22

    Closed pending script re-submission.

     

Log in to post a comment.

MongoDB Logo MongoDB