[Koha-bugs] [Bug 34510] New: connexion_import_daemon.pl should flush logs to make them more useful / timely

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Aug 9 20:07:40 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34510

            Bug ID: 34510
           Summary: connexion_import_daemon.pl should flush logs to make
                    them more useful / timely
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Command-line Utilities
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: JBoyer at equinoxOLI.org
        QA Contact: testopia at bugs.koha-community.org
                CC: robin at catalyst.net.nz

Created attachment 154338
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154338&action=edit
Flush Connexion Import Daemon Log

The connexion_import_daemon.pl tool can output logs to the location specified
in its config file, but because it uses buffered files (fine) and never flushes
the buffer (not fine) the latest log entries are not available until additional
records are submitted or the daemon is restarted and the log filehandle closed.

The attached patch flushes the log only at the end of the request so the logs
are usefully up to date without spamming i/o flushes on every call to log().

To test, pre-patch:
1. Export or locate a single marc record in binary format
2. Setup the connexion_import_daemon.pl as in
https://koha-community.org/manual/19.11/en/html/third_party_software.html#oclc-connexion-gateway
and take note of the logging location
3. Using Connexion or netcat, send the record to the specified port ( nc
koha-host 8000 < recrd.mrc )
4. Check the logfile configured in 2. It will likely end somewhere in the
middle of the "Response: XYZ" output (probably somewhere in the middle of some
marcxml)
5. Stop the daemon and verify that the remainder of the response is logged
6. Apply the patch
7. Restart the import daemon and resend the record from step 3
8. This time the full response should be logged as soon as the record is sent

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list