Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

326
Visualizações
Android: java.util.logging.Logger vs android.util.Log

Why does Android maintain 2 different Log classes that seem to support the same things?

I'm talking about:

  1. Log android.util.Log
  2. Logger java.util.logging.Logger

For what I've seen for some years developing, every Android official documentation points to the Log and not the Logger.

Even specific loggers like the TimingLogger uses the Log.


So why are those 2 supported?

Are there any feature that can be used through Logger than I can't achieve through Log?

Are there specific use cases for both?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The feature crossover seems to be:

  1. android.util.Log = java.util.logging.Logger
  2. android.util.Printer = java.util.logging.Formatter
  3. android.util.PrintStreamPrinter = java.util.logging.StreamHandler

Seems like "android.util.Log" is going to have:

  1. Support for android log.
  2. Support for out to Streams, Writers, and Strings.
  3. Is going to be a smaller, lightweight, and probably faster.

Looks like "J.U.L" is going to have:

  1. Buffering of records with the java.util.logging.MemoryHandler. This is good for say when a SEVERE error occurs you can include the last 1000 records which may be at lower level.
  2. Filtering of records using java.util.logging.Filter. There are no out of box filters included but it does give more granularity over implementing this behavior in a android.util.Printer
  3. Out of box support for XML.
  4. Out of box support for Sockets.
  5. Support for 3rd party java.util.logging.Handler implementations.
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda