logs not visible

9 views
Skip to first unread message

165-Rishil Boddula

unread,
Sep 10, 2023, 3:30:46 AM9/10/23
to Getting started with Spring Framework
Hey i wanted to to create a a firebase app using springboot. The problem I am facing is I  am not able to see the logs I  have written in my code which means I messed it up .I request you all to help me.
Here is the code-

package com.example.internshiipp2;


import java.io.File;


import java.io.FileInputStream;

import java.io.IOException;

import java.util.Objects;




import org.slf4j.Logger;

import org.slf4j.LoggerFactory;

import org.springframework.stereotype.Component;


import com.google.auth.oauth2.GoogleCredentials;

import com.google.firebase.FirebaseApp;

import com.google.firebase.FirebaseOptions;

import jakarta.annotation.PostConstruct;



@Component


public class Fbase_Connection {

@PostConstruct

public FirebaseApp FireBase_Conn(){


Logger log=LoggerFactory.getLogger(Fbase_Connection.class);

try {

ClassLoader classloader=Fbase_Connection.class.getClassLoader();

File jsonFile = new File(Objects.requireNonNull(classloader.getResource("service.json")).getFile());

FileInputStream serviceAccount =

new FileInputStream(jsonFile.getAbsoluteFile());


FirebaseOptions options = new FirebaseOptions.Builder()

.setCredentials(GoogleCredentials.fromStream(serviceAccount))

.setDatabaseUrl("https://arctic-study-391810-default-rtdb.asia-southeast1.firebasedatabase.app")

.build();

FirebaseApp fire_Conn=FirebaseApp.initializeApp(options);

log.trace("mrthod accesed");

log.info("METHOD ACCESSED,FIREBASE INITIALIZED");

return fire_Conn;

}

catch(IOException e) {

log.error("Error initializing Firebase:", e);

return null;

}

}


}

165-Rishil Boddula

unread,
Sep 10, 2023, 3:33:20 AM9/10/23
to Getting started with Spring Framework

. ____ _ __ _ _

/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

\\/ ___)| |_)| | | | | || (_| | ) ) ) )

' |____| .__|_| |_|_| |_\__, | / / / /

=========|_|==============|___/=/_/_/_/

[32m :: Spring Boot :: [39m [2m (v3.1.3) [0;39m


[2m2023-09-10T12:11:50.273+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mc.e.i.Internshiipp2Application [0;39m [2m: [0;39m Starting Internshiipp2Application using Java 17.0.7 with PID 32697 (/Users/rishilboddula/Documents/workspace-spring-tool-suite-4-4.19.0.RELEASE/Internshiipp-2/target/classes started by rishilboddula in /Users/rishilboddula/Documents/workspace-spring-tool-suite-4-4.19.0.RELEASE/Internshiipp-2)

[2m2023-09-10T12:11:50.276+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mc.e.i.Internshiipp2Application [0;39m [2m: [0;39m No active profile set, falling back to 1 default profile: "default"

[2m2023-09-10T12:11:50.829+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mtrationDelegate$BeanPostProcessorChecker [0;39m [2m: [0;39m Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$SpringCGLIB$$0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

[2m2023-09-10T12:11:50.868+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36m.w.s.a.s.AnnotationActionEndpointMapping [0;39m [2m: [0;39m Supporting [WS-Addressing August 2004, WS-Addressing 1.0]

[2m2023-09-10T12:11:51.077+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mo.s.b.w.embedded.tomcat.TomcatWebServer [0;39m [2m: [0;39m Tomcat initialized with port(s): 8090 (http)

[2m2023-09-10T12:11:51.085+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mo.apache.catalina.core.StandardService [0;39m [2m: [0;39m Starting service [Tomcat]

[2m2023-09-10T12:11:51.086+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mo.apache.catalina.core.StandardEngine [0;39m [2m: [0;39m Starting Servlet engine: [Apache Tomcat/10.1.12]

[2m2023-09-10T12:11:51.180+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mo.a.c.c.C.[Tomcat].[localhost].[/] [0;39m [2m: [0;39m Initializing Spring embedded WebApplicationContext

[2m2023-09-10T12:11:51.180+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mw.s.c.ServletWebServerApplicationContext [0;39m [2m: [0;39m Root WebApplicationContext: initialization completed in 863 ms

[2m2023-09-10T12:11:51.293+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mc.e.internshiipp2.Fbase_Connection [0;39m [2m: [0;39m METHOD ACCESSED,FIREBASE INITIALIZED

[2m2023-09-10T12:11:51.632+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mo.s.b.w.embedded.tomcat.TomcatWebServer [0;39m [2m: [0;39m Tomcat started on port(s): 8090 (http) with context path ''

[2m2023-09-10T12:11:51.641+05:30 [0;39m [32m INFO [0;39m [35m32697 [0;39m [2m--- [0;39m [2m[ main] [0;39m [36mc.e.i.Internshiipp2Application [0;39m [2m: [0;39m Started Internshiipp2Application in 1.68 seconds (process running for 2.212)

this is the output displayed
Reply all
Reply to author
Forward
0 new messages