public int Log (Message msg)
		{
			if (msg == null)
				throw new ArgumentNullException ("msg");
			
			return asl_send (handle, msg.Handle);
		}
		public IEnumerable<Message> Search (Message msg)
		{
			if (msg == null)
				throw new ArgumentNullException ("msg");
			var search = asl_search (handle, msg.Handle);
			IntPtr mh;
			
			while ((mh = aslresponse_next (search)) != IntPtr.Zero)
				yield return new Message (mh);

			aslresponse_free (search);
		}
		public int Log (Message msg, string text, params object [] args)
		{
			var txt = text == null ? "" : String.Format (text, args);
			if (txt.IndexOf ("%") != -1)
				txt = txt.Replace ("%", "%%");
			return asl_log (handle, msg == null ? IntPtr.Zero : msg.Handle, txt);
		}