{"id":28283304,"url":"https://github.com/joaopedrodevms/logify","last_synced_at":"2026-01-27T10:34:13.794Z","repository":{"id":292857993,"uuid":"982173320","full_name":"joaopedrodevms/Logify","owner":"joaopedrodevms","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-23T18:47:13.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T19:42:23.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"MQL4","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joaopedrodevms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-12T13:35:31.000Z","updated_at":"2025-06-23T18:47:16.000Z","dependencies_parsed_at":"2025-05-12T14:56:13.422Z","dependency_job_id":"cbac3e93-bd25-4e4e-b5fc-fbd0aa37dcb4","html_url":"https://github.com/joaopedrodevms/Logify","commit_stats":null,"previous_names":["joaopedrodevms/logify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joaopedrodevms/Logify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopedrodevms%2FLogify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopedrodevms%2FLogify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopedrodevms%2FLogify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopedrodevms%2FLogify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joaopedrodevms","download_url":"https://codeload.github.com/joaopedrodevms/Logify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaopedrodevms%2FLogify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-21T16:14:44.093Z","updated_at":"2026-01-27T10:34:13.789Z","avatar_url":"https://github.com/joaopedrodevms.png","language":"MQL4","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logify\n\n**Logify** é uma biblioteca de registros para MQL projetada para simplificar a depuração, o rastreamento e o monitoramento de EAs e indicadores. Ela fornece registros estruturados, personalizáveis ​​e organizados diretamente no gráfico ou no terminal, com suporte para níveis de registro, formatos flexíveis e múltiplos manipuladores. Uma solução leve e elegante, fácil de integrar aos seus projetos MQL.\n\n## 📦 Funcionalidades\n\n- Múltiplos níveis de log: DEBUG, INFO, ALERTA, ERRO, FATAL\n- Exibe logs diretamente no gráfico, terminal, arquivos ou até mesmo no banco de dados\n- Formato e layout de log personalizáveis\n- Arquitetura modular com múltiplos manipuladores\n- Leve e fácil de integrar e usar\n\n## 🚀 Instalação\n\n1. Copie a pasta /Logify para:\n``` shell\nMQL5/Include/\n```\n2. Inclua o Logify no seu EA, indicador ou script:\n\n``` c++\n#include \u003cLogify/Logify.mqh\u003e\n```\n\n\n## 🔧 Exemplo de início rápido\n\nExemplo simples com configurações padrão:\n``` c++\n//+------------------------------------------------------------------+\n//| Import                                                           |\n//+------------------------------------------------------------------+\n#include \u003cLogify/Logify.mqh\u003e\nCLogify Logify;\n//+------------------------------------------------------------------+\n//| Expert initialization function                                   |\n//+------------------------------------------------------------------+\nint OnInit()\n  {\n   //--- Example logs\n   Logify.Debug(\"Initialization started\");\n   Logify.Info(\"Account balance is OK\");\n   Logify.Alert(\"Take profit reached\");\n   Logify.Error(\"Failed to send order\", \"Order\", \"Reason: No money\");\n   Logify.Fatal(\"Critical error: Invalid input parameters\");\n\n   //---\n   return(INIT_SUCCEEDED);\n  }\n//+------------------------------------------------------------------+\n```\nExemplo avançado, com configurações personalizadas do manipulador. Neste exemplo, salvamos o registro de log em arquivos e no comentário do gráfico. Personalizamos as configurações para cada um deles.\n``` c++\n//+------------------------------------------------------------------+\n//| Import                                                           |\n//+------------------------------------------------------------------+\n#include \u003cLogify/Logify.mqh\u003e\nCLogify Logify;\n//+------------------------------------------------------------------+\n//| Expert initialization function                                   |\n//+------------------------------------------------------------------+\nint OnInit()\n  {\n   //--- Configure comment handler\n   MqlLogifyHandleCommentConfig config_comment;\n   config_comment.size = 10;\n   config_comment.frame_style = LOG_FRAME_STYLE_SINGLE;\n   config_comment.direction = LOG_DIRECTION_UP;\n   config_comment.title = \"My Expert\";\n\n   //--- Create and configure comment handler\n   CLogifyHandlerComment *handler_comment = new CLogifyHandlerComment();\n   handler_comment.SetConfig(config_comment);\n   handler_comment.SetLevel(LOG_LEVEL_DEBUG);\n   handler_comment.SetFormatter(new CLogifyFormatter(\"{date_time} [{levelname}]: {msg}\",\"hh:mm:ss\"));\n   \n   //--- Configure file handler\n   MqlLogifyHandleFileConfig file_config;\n   file_config.CreateDateRotationConfig(\"my_expert\",\"logs\",LOG_FILE_EXTENSION_LOG,10,100,CP_UTF8);\n   \n   //--- Create and configure file handler\n   CLogifyHandlerFile *handler_file = new CLogifyHandlerFile();\n   handler_file.SetConfig(file_config);\n   handler_file.SetLevel(LOG_LEVEL_DEBUG);\n   handler_file.SetFormatter(new CLogifyFormatter(\"{date_time} [{levelname}]: {msg} ({filename} | {origin} | {function})\",\"hh:mm:ss\"));\n   \n   //--- Attach handler\n   Logify.AddHandler(handler_comment);\n   Logify.AddHandler(handler_file);\n\n   //--- Example logs\n   Logify.Debug(\"Initialization started\");\n   Logify.Info(\"Account balance is OK\");\n   Logify.Alert(\"Take profit reached\");\n   Logify.Error(\"Failed to send order\", \"Order\", \"Reason: No money\");\n   Logify.Fatal(\"Critical error: Invalid input parameters\");\n   \n   //---\n   return(INIT_SUCCEEDED);\n  }\n//+------------------------------------------------------------------+\n```\n\nPara entender cada uma das configurações, recomendo a leitura dos artigos abaixo, onde explico cada etapa do desenvolvimento da biblioteca:\n\n- [Mastering Log Records (Part 1): Fundamental Concepts and First Steps in MQL5](https://www.mql5.com/en/articles/16447)\n- [Mastering Log Records (Part 2): Formatting Logs](https://www.mql5.com/en/articles/16833)\n- [Mastering Log Records (Part 3): Exploring Handlers to Save Logs](https://www.mql5.com/en/articles/16866)\n- [Mastering Log Records (Part 4): Saving Logs to Files](https://www.mql5.com/en/articles/16986)\n- [Mastering Log Records (Part 5): Optimizing the Handler with Cache and Rotation](https://www.mql5.com/en/articles/17137)\n- [Mastering Log Records (Part 6): Saving Logs to Database](https://www.mql5.com/en/articles/17709)\n- [Mastering Log Records (Part 7): How to Show Logs on Chart](https://www.mql5.com/en/articles/18291)\n- [Mastering Log Records (Part 8): Error Records That Translate Themselves](https://www.mql5.com/en/articles/18467)\n- [Mastering Log Records (Part 9): Implementing the builder pattern and adding default configurations](https://www.mql5.com/en/articles/18602)\n- [Mastering Log Records (Part 10): Avoiding Log Replay by Implementing a Suppression](https://www.mql5.com/en/articles/19014)\n\n## ✔️ Níveis de Log\n\n| Nível         | Descrição                                 |\n|---------------|-------------------------------------------|\n| DEBUG         | Informações detalhadas para depuração     |\n| INFO          | informações gerais                        |\n| WARNING       | Avisos ou eventos importantes             |\n| ERROR         | Erros que requerem atenção                |\n| FATAL         | Erros críticos, interromper execução      |\n\n\n## 🖥️ Handlers incluídos\n\nCada manipulador define onde os logs serão exibidos ou armazenados.\n\n| Handler   | Descrição                                      |\n|-----------|------------------------------------------------|\n| Comment   | Exibir logs diretamente no gráfico (Comentário)|\n| Console   | Mostrar logs no terminal MetaTrader            |\n| File      | Salvar logs em arquivos .txt ou .log           |\n| Database  | Armazena logs no banco de dados SQLite local   |\n\nVocê pode usar um ou combinar vários manipuladores ao mesmo tempo, como gráfico + arquivo + console, por exemplo.\n\n\n## 🛠️ Formato de log\n\nExemplo de padrão de formatação:\n``` c++\n\"{date_time} [{levelname}]: {msg}\"\n```\nTokens disponíveis:\n\n- {levelname}: Nome do nível (DEBUG, INFO, ERROR, etc.)\n- {msg}: Mensagem principal\n- {args}: Argumentos ou detalhes adicionais\n- {timestamp}: Carimbo de data/hora em segundos (Horário Unix)\n- {date_time}: Data e hora formatadas (hh:mm:ss, etc.)\n- {level}: Código numérico para o nível (0 = DEBUG, 1 = INFO...)\n- {origin}: Origem ou contexto definido na chamada do log\n- {filename}: Nome do arquivo de origem (se disponível)\n- {function}: Nome da função da qual foi chamado\n- {line}: Número da linha no código onde o log ocorreu\n\n## ⚖️ Licença\n\nLicença MIT — Gratuita para uso em projetos pessoais e comerciais.\n\n## 👨‍💻 Autor\n\nDesenvolvido por [joaopedrodev](https://www.mql5.com/en/users/joaopedrodev), com foco em tornar o desenvolvimento MQL mais profissional, organizado e eficiente.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaopedrodevms%2Flogify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaopedrodevms%2Flogify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaopedrodevms%2Flogify/lists"}