def FormatLogMessage(log_type, log_msg):
  if log_type != constants.ELOG_MESSAGE:
    log_msg = str(log_msg)

  return utils.SafeEncode(log_msg)
Formats a job message according to its type.
dataset/ETHPy150Open ganeti/ganeti/lib/cli.py/FormatLogMessage