sunnyLogger function

Logger sunnyLogger(
  1. Type type, {
  2. Type? subscript,
})

Produces a logger using snake case naming conventions. If subscript is provided, it will be appended to the name in square brackets, eg sunny_listcontact

Implementation

Logger sunnyLogger(Type type, {Type? subscript}) {
  String typeName = loggerNameOf(type);
  if (subscript != null) typeName += "[${loggerNameOf(subscript)}]";
  return Logger(typeName);
}