class Metanorma::Utils::Log
def create_entry(loc, msg, severity)
def create_entry(loc, msg, severity) msg = msg.encode("UTF-8", invalid: :replace, undef: :replace) item = { location: current_location(loc), severity: severity, message: msg, context: context(loc), line: line(loc, msg) } if item[:message].include?(" :: ") a = item[:message].split(" :: ", 2) item[:context] = a[1] item[:message] = a[0] end item end