import readline from 'readline'
import { EventEmitter } from 'events'
import l from 'chalk-log'

const rl = readline.createInterface({
	input: process.stdin,
	output: process.stdout,
	terminal: false
})

export default class Cli extends EventEmitter {
	init () {
		this.get()
	}

	get () {
		rl.question('> ', message => {
			this.emit('message', message)
		})
	}

	send ({ text }) {
		l.ok(text)
		this.get()
	}
}

@@ -375,16 +375,23 @@
 text
+, level
  %7D) %7B%0A%09%09
 l.ok
@@ -390,18 +390,71 @@
 %7B%0A%09%09
-l.ok(text)
+if (!l%5Blevel%5D) %7B%0A%09%09%09l.ok(text)%0A%09%09%7D else %7B%0A%09%09%09l%5Blevel%5D(text)%0A%09%09%7D
 %0A%09%09t

Add custom log level to cli