Skip to content

Logging

macmule edited this page Feb 6, 2017 · 1 revision

Introduction

This page details the postflight logging process.

Postflight

When jamJAR's postflight runs, it keeps a count of the number of items within the InstallResults, RemovalResults, Warnings & jamJAR's pending_count are all written to jamJAR's log file.

Script

When jamJAR's script is run, it calls a preflight function that gets the item counts before jamJAR's script has performed it actions. Then a postflight function reports afterwards.

jamJAR's policy also reports back the items within the managed_installs & managed_uninstalls arrays.

Running script jamJAR...
Script exit code: 0
Script result: Adding GoogleChrome to installs
Preflight: Contains 1 installs [u'GoogleChrome'], 0 uninstalls [], 0 pending, 0 warnings
Postflight: Contains 1 installs [u'GoogleChrome'], 0 uninstalls [], 0 pending, 0 warnings

This also includes warnings from Munki,

Running script jamJAR...
Script exit code: 0
Script result: Adding bleh to installs
Preflight: contains 1 installs ['bleh’], 0 uninstalls [], 0 pending, 0 warnings
Warning: Could not process item bleh for install. No pkginfo found in catalogs: production
Postflight: Contains 0 installs [], 0 uninstalls [], 0 pending, 1 warnings

Or if Yolo Mode was engaged:

Running script jamJAR.py...
Script exit code: 0
Script result: Adding GoogleChrome to uninstalls
Preflight: Contains 0 installs [], 1 uninstalls [u'GoogleChrome'], 1 pending, 0 warnings
WARNING: YOLO mode engaged
Postflight: Contains 0 installs [], 1 uninstalls [u'GoogleChrome'], 0 pending, 0 warnings

Extension Attribute (optional)

jamJAR's Extension Attribute reads the last line of the jamJAR.log (if present), & returns this information back to Jamf Pro as per the below:

2017-02-05 20:35:35 INFO 1 installed, 0 removed, 0 pending, 0 warnings

Clone this wiki locally