001/* 002 * Copyright (c) 2004-2013 Tada AB and other contributors, as listed below. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the The BSD 3-Clause License 006 * which accompanies this distribution, and is available at 007 * http://opensource.org/licenses/BSD-3-Clause 008 * 009 * Contributors: 010 * Tada AB 011 */ 012package org.postgresql.pljava.example; 013 014import java.util.logging.Level; 015import java.util.logging.Logger; 016 017/** 018 * Provides a function to log, at the specified level, a specified message. 019 * The level is a {@link java.util.logging.Level} name, not a PostgreSQL 020 * level name. 021 */ 022public class LoggerTest { 023 public static void logMessage(String logLevel, String message) { 024 Logger.getAnonymousLogger().log(Level.parse(logLevel), message); 025 } 026}