• Hibernate 使用log4j,sl4j 记录日志并记录sql 语句参数的值

    在Hibernate内部使用slf4j 来处理日志,所以在配置Hibernate日志的时候,slf4j 是必不可少的jar包, 严格说了slf4j 只是一个日志接口,可以由很多其它三方的 jar 来实现,比如用log4j实现等, 对于日志的配置应该都知道怎么配了,但是经常在日志中看到类似如下的语句:insert into stock (STOCK_CODE, STOCK_NAME) values (?, ?) , 里面全部是参数化的“?” 号, 然后这些值并没有打印出来,对于查看日志来说,还是有些不方便,怎么在日志中打印出这些参数值呢,是可以通过log4j 的配置做到的。

    2014-01-20[java]

    阅读更多
  • python 写日志文件

    项目的开发过程中,日志文件是少不了的,通过写日志文件,可以知道程序运行的情况。特别当部署在生产环境中的时候,这个时候一般不能debug , 当然在有些情况时可以 remote debug (远程debug)。那种情况另当别论。还是用通常的写日志的方法,比如在 java 中,经常可以看到 log4j,sf4j,logback等三方组件来写日志。在python中如何实现呢,其实python 本身也带了日志操作的库。可以直接使用。这里我把在项目中用到的整理了一下,分享在下面,这个实现的方法,主要有两点1. 写日志的类2.日志配置文件(handler,logger,以及日志保存的路径等)

    2012-09-25[Python/Django]

    阅读更多
  • How to automate login a website Java example

    How to automate login a website  Java example

    In this example, we will show you how to login a website via standard Java HttpsURLConnection. This technique should be working in most of the login form.

    2019-08-18[Java]

    阅读更多
  • JSF 2 + Log4j Integration Example

    JSF 2 + Log4j Integration Example

    In this tutorial, we will show you how to integrate the log4j framework with the JSF 2.x web application. JSF is using java.util.logging, you need extra works to redirect the logging from JSF’s java.util.logging to log4j, with a serious penalty of performance, make sure use this trick only during local development or debugging environment.

    2019-08-18[Java]

    阅读更多
  • Log4j Tutorial

    Log4j Tutorial

    Apache log4j, a classic logging tool in Java. Below are a series of Log4j 1.2 tutorials :

    2019-08-18[Java]

    阅读更多
  • Logback Duplicate log messages

    Review a simple Java application and log a message via Logback.

    2019-08-18[Java]

    阅读更多
  • Spring Security Custom Login Form Annotation Example

    Spring Security Custom Login Form Annotation Example

    In this tutorial, we will convert previous Spring Security custom login form (XML) project to a pure annotation-based project.

    2019-08-17[Java]

    阅读更多
  • Spring Security : limit login attempts example

    Spring Security : limit login attempts example

    In this tutorial, we will show you how to limit login attempts in Spring Security, which means, if a user try to login with an invalid password more than 3 times, the system will lock the user and make it unable to login anymore.

    2019-08-17[Java]

    阅读更多
  • Spring Security Remember Me Example

    Spring Security Remember Me Example

    In this tutorial, we will show you how to implement “Remember Me” login feature in Spring Security, which means, the system will remember the user and perform automatic login even after the user’s session is expired.

    2019-08-17[Java]

    阅读更多
  • log4j.xml Example

    log4j.xml Example

    Here’s an XML version of log4j properties file, just for sharing.

    2019-08-17[Java]

    阅读更多
  • Log4j hello world example

    Log4j hello world example

    In this tutorial, we will show you how to use the classic log4j 1.2.x to log a debug or error message in a Java application.

    2019-08-17[Java]

    阅读更多
  • Count IP address in Nginx access logs

    Recently, many referer spam hit on my server, below is the command I used to find and count the IP Address from a Nginx access log file.

    2019-08-17[Java]

    阅读更多
  • Maven Exclude logback.xml in Jar file

    This example shows you how to use Maven to exclude the logback.xml file from the final Jar file.

    2019-08-17[Java]

    阅读更多
  • Maven Exclude log4j.properties in Jar file

    This example shows you how to use Maven to exclude the log4j.properties file from your Jar file.

    2019-08-17[Java]

    阅读更多
  • logback.xml Example

    Here are a few logback.xml examples that are used in my projects, just for sharing.

    2019-08-17[Java]

    阅读更多
共有 40 条记录 12末页

 


  • 微信公众号

  • 我的微信

站点声明:

1、一号门博客CMS,由Python, MySQL, Nginx, Wsgi 强力驱动

2、部分文章或者资源来源于互联网, 有时候很难判断是否侵权, 若有侵权, 请联系邮箱:summer@yihaomen.com, 同时欢迎大家注册用户,主动发布无版权争议的 文章/资源.

3、鄂ICP备14001754号-3, 鄂公网安备 42280202422812号