1111import java .util .Set ;
1212import java .util .TreeSet ;
1313
14- import org .apache .log4j .Logger ;
1514import org .eclipse .jdt .core .formatter .CodeFormatterApplication ;
1615import org .frameworkset .gencode .core .ui .GenAddJsp ;
1716import org .frameworkset .gencode .core .ui .GenI8N ;
3029import org .frameworkset .gencode .entity .MethodParam ;
3130import org .frameworkset .gencode .entity .ModuleMetaInfo ;
3231import org .frameworkset .gencode .entity .SortField ;
32+ import org .slf4j .Logger ;
33+ import org .slf4j .LoggerFactory ;
3334
3435import com .frameworkset .common .poolman .DBUtil ;
3536import com .frameworkset .common .poolman .sql .ColumnMetaData ;
5051 *
5152 */
5253public class GencodeServiceImpl {
53- private static final Logger log = Logger .getLogger (GencodeServiceImpl .class );
54+ private static final Logger log = LoggerFactory .getLogger (GencodeServiceImpl .class );
5455 public static String DEFAULT_SOURCEPATH ;
5556 public static String SQLITEPATH ;
5657 private ControlInfo controlInfo ;
@@ -915,7 +916,7 @@ private List<Field> getServiceImplFields(String serviceName)
915916 log4j .setFieldName ("log" );
916917 log4j .setType ("Logger" );
917918 String entityPackageInfo = javamodulePackage +".service" ;
918- log4j .setDefaultValue ("Logger .getLogger(" +entityPackageInfo + "." +serviceName +".class)" );
919+ log4j .setDefaultValue ("LoggerFactory .getLogger(" +entityPackageInfo + "." +serviceName +".class)" );
919920 fields .add (log4j );
920921
921922 Field dao = new Field ();
@@ -1909,7 +1910,8 @@ private List<String> evalServiceImplImport( ) {
19091910 imports .add (javamodulePackage +".entity.*" );
19101911 imports .add ("com.frameworkset.util.ListInfo" );
19111912 imports .add ("com.frameworkset.common.poolman.ConfigSQLExecutor" );
1912- imports .add ("org.apache.log4j.Logger" );
1913+ imports .add ("org.slf4j.Logger" );
1914+ imports .add ("org.slf4j.LoggerFactory" );
19131915 imports .add ("java.util.List" );
19141916 if (this .isPagineWithDBRownumberOver ())
19151917 imports .add ("com.frameworkset.common.poolman.ConfigPagineOrderby" );
@@ -1935,7 +1937,8 @@ private List<String> evalActionImplImport( ) {
19351937 List <String > imports = new ArrayList <String >();
19361938 imports .add (javamodulePackage +".entity.*" );
19371939 imports .add ("com.frameworkset.util.ListInfo" );
1938- imports .add ("org.apache.log4j.Logger" );
1940+ imports .add ("org.slf4j.Logger" );
1941+ imports .add ("org.slf4j.LoggerFactory" );
19391942 imports .add ("java.util.List" );
19401943 imports .add ("java.util.Map" );
19411944 imports .add ("com.frameworkset.util.StringUtil" );
@@ -1976,7 +1979,7 @@ public static void main(String[] args)
19761979 }
19771980 catch (EngineException e )
19781981 {
1979- log .error (e , e );
1982+ log .error ("" , e );
19801983 }
19811984
19821985 inputs = new ArrayList (2 );
@@ -1990,7 +1993,7 @@ public static void main(String[] args)
19901993 }
19911994 catch (EngineException e )
19921995 {
1993- log .error (e , e );
1996+ log .error ("" , e );
19941997 }
19951998 inputs = new ArrayList (2 );
19961999 inputs .add ("td_tableinfo_name" );
@@ -2003,7 +2006,7 @@ public static void main(String[] args)
20032006 }
20042007 catch (EngineException e )
20052008 {
2006- log .error (e , e );
2009+ log .error ("" , e );
20072010 }
20082011 inputs = new ArrayList (2 );
20092012 inputs .add ("td_tableinfo_name" );
@@ -2016,7 +2019,7 @@ public static void main(String[] args)
20162019 }
20172020 catch (EngineException e )
20182021 {
2019- log .error (e , e );
2022+ log .error ("" , e );
20202023 }
20212024 }
20222025
0 commit comments