module Jekyll::Algolia::Logger
def self.log(input)
Where X is either I, W or E for marking respectively an info, warning or
"X:Your content"
line - Line to display. Expected to be of the following format:
Public: Displays a log line
def self.log(input) type, content = /^(I|W|E):(.*)/m.match(input).captures logger_mapping = { 'E' => :error, 'I' => :info, 'W' => :warn } # Display by chunk of 80-characters lines lines = Utils.split_lines(content, 80) lines.each do |line| Jekyll.logger.send(logger_mapping[type], line) end end