Posts Tagged ‘mieLogger’

[Javascript] jQuery mielogger Plugin : Make Any Log Visible

Friday, December 2nd, 2011

I made a jQuery plugin named mielogger.

This makes any string you set visible on browser.
It was named from mieru (it means ‘you can see’ in Japanese ) and logger.

It is very useful tool, when you develop mobile browser app such as iOS, Android, etc.
Because those devices can’t be shown console.log() function.
But if log is visible in browser, you can see it.

update Dec. 10th 2011

>> demo
>> download mielogger

how to use

First, you must import jQuery and mielogger.js.

	<script src="jquery-1.6.2.min.js"></script>
	<script src="mielogger.js"></script>

Seccond, init mieLogger.

var logger = $().mielogger();

Third, you can write any string on it with log method.

logger.mlog('Hello mielogger');

I used mielogger’s instance on the last code. But you can also use this way.

$().mlog("It's OK");

option settings

You can set options to it when you init it.

There are some parameters.

width : log area width
height : log area height
maxlow : max log line length. mielogger can hold lines over the height of it
align : if it is set, log area’s layout is changed.
‘TL’ top left
‘TR’ top right
‘BL’ bottom left
‘BR’ bottom right

example1: width 300px, height 100px


example2: width 450px, maxlow 100


example3: align BL


Let’s log it.