简体   繁体   English

登录单页应用程序的最佳方法是什么

[英]What's the best way to log in Single Page Application

Just want some insight on this. 只想对此有所了解。

Currently I'm using console log in an Angular SPA. 目前,我在Angular SPA中使用控制台日志。 but obviously this log is only viewable when I develop it. 但是很明显,只有在我开发该日志时,该日志才可见。 When it is out there in other people's browse, I have no way to see and check. 当它在其他人的浏览中显示时,我无法查看和检查。

What library/tools I can use to have this sort of runtime information when the SPA is in beta test, or even in production? 当SPA处于beta测试甚至处于生产状态时,我可以使用哪些库/工具来获得此类运行时信息?

As you're using AngularJS, your best option is to use the $log service (which you have to inject into your own controllers, etc.) 在使用AngularJS时,最好的选择是使用$ log服务(必须将其注入到自己的控制器中,等等)。

Then, there are a few options to get the relevant bits out: 然后,有一些选项可用于删除相关位:

  • Sentry - mostly focused on error/warning reporting, is integrated with AngularJS - good for production Sentry-主要专注于错误/警告报告,已与AngularJS 集成 -适用于生产
  • Loggly - collects everything, good for staging environments Loggly-收集所有内容,适用于暂存环境
  • Build your own - if you are feeling brave! 建立自己的 -如果您感到勇敢!

I think you should take a look a services like: 我认为您应该看看类似的服务:

and others like them, and see what you think fits your scenario best. 和其他喜欢它们的人,看看您认为最适合您的情况的是。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有什么方法可以在单个页面应用程序中记录url和哈希片段 - Is there any way to log the url and hash fragment in a single page application 在单页应用程序(SPA)中处理身份验证的最佳方法 - best way to handle authentication in single page application ( SPA) 在 Github 页面上,您可以将 React 应用程序作为单个文件运行,并将其称为 function。在 Google Cloud Platform 上执行此操作的最佳方法是什么? - On Github Pages you can run a React application as a single file and call it as a function. What's the best way to do that on Google Cloud Platform? JavaScript:在页面初始化时加载应用程序环境变量的最佳方法是什么? - JavaScript: What is the best way to load application environment variables at page initialization? 使文本文件可用于Web应用程序的最佳方法是什么? - What's the best way to make a text file available to a web application? 从服务器获取聊天应用程序消息的最佳方法是什么 - What's the best way to retrieve messages from the server for a chat application 在网页中模拟 DOS 或终端屏幕的最佳方法是什么? - What's the best way to simulate a DOS or Terminal screen in a web page? 在下拉菜单中停止页面滚动的最佳方法是什么 - What's the best way to stop page scroll within a dropdown menu 构建多页响应表单的最佳方法是什么? - What's the best way building a multi-page responsive form? 在页面上选择并突出显示html的最佳方法是什么? - What's the best way to select and highlight html on a page?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM