首页 \ 问答 \ Lua脚本实现(Lua scripting implementation)

Lua脚本实现(Lua scripting implementation)

我正在努力将Lua实现到我正在开发的应用程序之一。 目前我只是使用C api并使用lua_register注册函数,但我希望能够将静态和非静态函数指针传递给某些类方法。

我在网上找到了某些库,但由于我需要提供的整体功能很少,我想知道是否有一种简单的方法可以做到这一点。

谢谢。


I'm currently working on implementing Lua into one of the applications that I'm working on. Currently I'm just using the C api and registering functions using lua_register, but I'd like to be able to pass static and non static function pointers to certain class methods.

I've found certain libraries on the net, but since I need very little of the overall functionality they provide I was wondering if there's an easy way to do this.

Thank you.


原文:https://stackoverflow.com/questions/1281972
更新时间:2022-06-01 06:06

最满意答案

免责声明 :我是logback项目的维护者。

这绝对值得在logback文档中进行说明。 你能否在http://jira.qos.ch上提交一份错误报告? 引用此StackOverflow条目应该足够了。

至于哪个根记录器是活动的,假设条件为真,它们将是活动的。 名为FILE和CON的两个appender都将附加到根记录器。 级别将设置为最后一个值集。 请注意,条件中的根元素不设置级别。


Disclaimer: I am the maintainer of the logback project.

This definitely deserves a clarification in the logback documentation. Can you please file a bug report at http://jira.qos.ch ? Referencing this StackOverflow entry should be enough.

As for which root logger is active, assuming the conditional is true, they will be both active. Both appenders named FILE and CON would be attached to the root logger. The level would be set to the last value set. Note that the root element within the conditional does not set a level.

相关问答

更多
  • 创建一个ThresholdLoggerFilter类,可以放在appender上,如: INFO
    你永远不会有一个以上的根记录器,所以你的问题有点误导。 你在寻找的是如何微调每个appender记录哪些事件。 为此,您需要为每个appender添加一个ThresholdFilter: http://logback.qos.ch/manual/filters.html#thresholdFilter INFO 配置FILE-a ...
  • 我不知道现有的解决方案。 我可能会想出一个带有如下接口的记录器(无论它是独立的实现还是只是现有的包装): class Logger { public: enum Level { ... }; static Logger* Instance(); void Log(Level level, const char* module, const char* msg); void AddModuleFilter(const char* context, con ...
  • 您可以在子记录器上附加一个新的处理程序,它具有自己的格式化程序。 您应该能够创建一个与根处理程序写入同一文件的处理程序,因为flush操作使用锁。 handler = logging.FileHandler(filename) formatter = logging.Formatter(newformat) handler.setFormatter(formatter) log = logging.getLogger(yourloggername) log.setHandler(handler) log. ...
  • 使用级别过滤器 INFO ACCEPT DENY 因此你的logback.xml会变成
    我不知道什么是错的,但你可以做到以下几点: 检查你的logback.xml是否在jar文件中 尝试使用java -Dlogback.configurationFile = / path / to / logback.xml -jar event-assembly-0.1.1-SNAPSHOT.jar启动应用程序 So, how I found out, the sbt-assembly removed some logback-binaries from the result jar (it was set ...
  • 关闭记录器的可加性(默认为true): 正如logback-manual描述的那样: http : //logback.qos.ch/manual/configuration.html#overrridingCumulativity 如果您只是希望它没有SYSLOG appender,而是FIL ...
  • 是的,这是红宝石的美丽和痛苦。 我会开始重写Rails.logger= config/application.rb中的一些方法(比如你说的)“宣布”。 只需添加到config/application.rb类似的东西,并观看日志: Rails.singleton_class.send('alias_method', :old_logger=, :logger=) module Rails def self.logger=(value) puts "Hey logger '#{value.inspe ...
  • 请检查此logback.xml文件之前可能已读入的类路径上的其他日志文件。 根据用法,类路径中较早的内容可能会在纯文本文件或JAR内部抢占此文件。 Please check for other log files on the classpath that might have been read in before this logback.xml file. Depending on the usage, something earlier in the classpath might preempt ...
  • 免责声明 :我是logback项目的维护者。 这绝对值得在logback文档中进行说明。 你能否在http://jira.qos.ch上提交一份错误报告? 引用此StackOverflow条目应该足够了。 至于哪个根记录器是活动的,假设条件为真,它们将是活动的。 名为FILE和CON的两个appender都将附加到根记录器。 级别将设置为最后一个值集。 请注意,条件中的根元素不设置级别。 Disclaimer: I am the maintainer of the logback project. This ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。