Anytime Help Center

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Support
  • Guest
  • Log In
  • AKG
    Microphones Wireless Integrated Systems Automatic Mixers Headphones Discontinued Products (AKG) Video Manual Series (AKG) General AKG Inquiries Certifications (AKG)
  • AMX
    Networked A/V Distribution (AVoIP) Traditional A/V Distribution Video Signal Processing Architectural Connectivity User Interfaces Control Processing Power (AMX) Programming (AMX) Software (AMX) Discontinued Products (AMX) Video Manual Series (AMX) General AMX Inquiries Certifications (AMX)
  • BSS
    Soundweb™ Omni Soundweb™ London Soundweb™ Contrio™ Software (BSS) Discontinued Products (BSS) Video Manual Series (BSS) General BSS Inquiries Certifications (BSS)
  • Crown
    CDi DriveCore Series CDi Series Commercial Series ComTech Series DCi DriveCore Series I-Tech HD Series XLC series XLi Series XLS DriveCore 2 Series XTi 2 Series Software (Crown) Discontinued Products (Crown) Video Manual Series (Crown) General Crown Inquiries Certifications (Crown)
  • dbx
    CX Series 500 Series DriveRack Personal Monitor Control ZonePRO Zone Controllers FeedBack Suppression Microphone Preamps Dynamics Processors Crossovers Equalizers Software (dbx) Discontinued Products (dbx) General dbx Inquiries Certifications (dbx)
  • Flux::
    Immersive Processing Analysis Subscriptions General FLUX: Inquiries
  • JBL
    Cinema Sound Installed Live Portable Tour Sound Recording & Broadcast Software (JBL) Discontinued Products (JBL) Video Manual Series (JBL) General JBL Inquiries Certifications (JBL)
  • Lexicon
    Plugins Effects Processors Cinema Discontinued Products (Lexicon) Video Manual Series (Lexicon) General Lexicon Inquiries Certifications (Lexicon)
  • Martin
    Atomic ELP ERA Exterior MAC P3 VC VDO Tools Discontinued Products (Martin) General Martin Inquiries Certifications (Martin)
  • Soundcraft
    Digital Analog Connected Analog Only Discontinued Products (Soundcraft) Video Manual Series (Soundcraft) General Soundcraft Inquiries Certifications (Soundcraft)
  • General HARMAN Inquiries
    Dante
+ More
  • Home
  • BSS
  • Video Manual Series (BSS)

Python - Logging & Attaching | MUSE

Video Manual Series


Written by Felipe Guerrero

Updated at August 26th, 2026

In this video, you’ll learn how to use logging and program attachment features to efficiently debug your Python scripts running on an AMX MUSE controller. We’ll walk through generating log messages at different severity levels and show you how to view them in real time by attaching your program in Visual Studio Code. You’ll also see how to adjust logging levels to reveal more detailed output, helping you pinpoint issues faster. By the end, you’ll have the tools needed to monitor, troubleshoot, and refine your applications with confidence.

What You’ll Learn:
• Using logging in MUSE Python programs
• Generating log messages at different severity levels
• Attaching to a running program in VS Code
• Viewing real-time log output for debugging
• Adjusting logging levels for deeper troubleshooting insight
• Best practices for monitoring and debugging applications

Transcript
Hello, and welcome to this video on creating log messages in your Python scripts.  On MUSE controllers, things like stack trace or system errors are still gathered by the controller and reported to the logging system.  However, information or errors that you would like to report from your script will need to utilize the program logger built into the context class.
To begin with, let’s take a look at the default script generated when we create a MUSE local program.  The second line of the script uses the log object built into the context class to output an info level message to the standard output that says “Sample Python Program”.
To see what this looks like when it is printed out, let’s attach VSCode to the script and see its output.  To do this, right-click on the name of the program that’s running on the controller and select Attach.  This will automatically bring up the standard output in VSCode.  You will see the message “Program attached, you will see outputs here.” to indicate it has succeeded in attaching to the script.

 
In addition, you will now see that the information beside the program name now says enabled/attached to show you which program you are attached to.  Only one script can be attached at a time.  This means that only log messages related to the attached program can be seen in the VSCode output section, but log messages from other scripts can still be seen in the Diagnostics -> Logs page of the controller or via the CLI.
Since this program outputs the “Sample Python Program” log message only when it boots up, let’s restart the program.  To do this, click the restart button to the right of the program name.  When the program restarts, you will see three different INFO messages appear in the output.  In addition to the log message in our script, there are two other messages that say “received Python callback listener” and “Python context running…”.  These two info messages are created by the MUSE controller itself on starting a Python script.
There are five different levels of messages that can be logged.  They are info, warn, error, debug, and trace.  Let’s see what each of those look like in code and in the output.
*** Add in code***
context.log.info('INFO message')
context.log.warn('WARN message')
context.log.error('ERROR message')
context.log.debug('DEBUG message')
context.log.trace('TRACE message')
******************
Notice that when we restarted the program, there are only three messages.  The DEBUG and TRACE messages are missing.  This is because the log level, by default, is set to INFO.  How do we know that, how can we find that out?  You can recall that parameter using context.log.level.
Let’s printout the log level before we printout our logs.
***Add in code***
context.log.info(f'Log level: {context.log.level}\r')
*****************
This command prints out a simple log message showing the Log level.  Let’s restart the code and see what it says.  
Just as we discussed earlier, the default value is set to INFO.
Now that we have a way to see what our log level is, we need a way to change the level so we can see all our log messages.  Since context.log.level is a parameter, this is a simple case of a direct assignment.  For this example, let’s set the log level to TRACE so we can see all the log messages.
***Add in code***
context.log.level = “TRACE”
*****************
With the log level set to TRACE, all our log messages are now visible in the output.  
With this, you should be able to create any necessary messages to debug your code and give your program detailed messaging as it runs.

Related Videos

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • VS Code Extension - Creating Program Folders | MUSE

Related Articles

  • VS Code Extension - Creating Program Folders | MUSE
Copyright © HARMAN Professional. All rights reserved. Privacy Policy | Terms of Use
Expand